Date: Sun, 30 Aug 1998 11:39:42 -0700 (PDT) From: schweikh@noc.dfn.de To: freebsd-gnats-submit@FreeBSD.ORG Subject: bin/7786: quota.h has superfluous semicolon in macro INITQFNAMES Message-ID: <199808301839.LAA19556@hub.freebsd.org>
index | next in thread | raw e-mail
>Number: 7786
>Category: bin
>Synopsis: quota.h has superfluous semicolon in macro INITQFNAMES
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sun Aug 30 11:40:01 PDT 1998
>Last-Modified:
>Originator: Jens Schweikhardt
>Organization:
DFN
>Release: 2.2.7R off of the CD
>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:
>Audit-Trail:
>Unformatted:
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808301839.LAA19556>
