From nobody  Sun Aug 30 11:39:42 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id LAA19556;
          Sun, 30 Aug 1998 11:39:42 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199808301839.LAA19556@hub.freebsd.org>
Date: Sun, 30 Aug 1998 11:39:42 -0700 (PDT)
From: schweikh@noc.dfn.de
To: freebsd-gnats-submit@freebsd.org
Subject: quota.h has superfluous semicolon in macro INITQFNAMES
X-Send-Pr-Version: www-1.0

>Number:         7786
>Category:       bin
>Synopsis:       quota.h has superfluous semicolon in macro INITQFNAMES
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 30 11:40:01 PDT 1998
>Closed-Date:    Thu Jun 1 19:20:49 PDT 2000
>Last-Modified:  Thu Jun 01 19:22:18 PDT 2000
>Originator:     Jens Schweikhardt
>Release:        2.2.7R off of the CD
>Organization:
DFN
>Environment:
FreeBSD hal9000.details.de 2.2.7-RELEASE FreeBSD 2.2.7-RELEASE #0
>Description:
quota.h has superfluous semicolon in macro INITQFNAMES.
This is actually a violation of C syntax and only passes
gcc because it is not used with the -pedantic flag.

schweikh@hal9000:~/tmp 0 $ cat tst.c
int i;;
schweikh@hal9000:~/tmp 0 $ gcc -pedantic -c tst.c
tst.c:1: warning: ANSI C does not allow extra `;' outside of a function

I have grepped the source tree for INITQFNAMES:

schweikh@hal9000:/usr/src 130 $ find . -name *.[ch] | xargs fgrep INITQFNAMES
./libexec/rpc.rquotad/rquotad.c:        char    *qfextension[] = INITQFNAMES;
./sbin/quotacheck/quotacheck.c:char *qfextension[] = INITQFNAMES;
./sys/i386/boot/dosboot/quota.h:#define INITQFNAMES { \
./sys/ufs/ufs/quota.h:#define INITQFNAMES { \
./sys/ufs/ufs/ufs_quota.c:static char *quotatypes[] = INITQFNAMES;
./usr.bin/quota/quota.c:char *qfextension[] = INITQFNAMES;
./usr.sbin/edquota/edquota.c:char *qfextension[] = INITQFNAMES;
./usr.sbin/quotaon/quotaon.c:char *qfextension[] = INITQFNAMES;
./usr.sbin/repquota/repquota.c:char *qfextension[] = INITQFNAMES;


FIX: remove the indicated semicolon in the two quota.h files,
/usr/src/sys/i386/boot/dosboot/quota.h
/usr/src/sys/ufs/ufs/quota.h

/*
 * Definitions for the default names of the quotas files.
 */
#define INITQFNAMES { \
    "user",     /* USRQUOTA */ \
    "group",    /* GRPQUOTA */ \
    "undefined", \
};   <------------------------------remove this semicolon


(Note that it is not a good idea to remove the semicolon in the *.c files
because initializers should almost never be defined with a semicolon.)

>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: nrahlstr 
State-Changed-When: Thu Jun 1 19:20:49 PDT 2000 
State-Changed-Why:  
Fixed in revision 1.11 of quota.h by bde. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=7786 
>Unformatted:
