[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] error: drop spurious semicolon
From: |
Eric Blake |
Subject: |
Re: [PATCH] error: drop spurious semicolon |
Date: |
Thu, 04 Sep 2014 10:42:52 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 09/04/2014 10:28 AM, Eric Blake wrote:
> limited to .[ch] files (maybe .y as well). So looking at emacs.git
> (commit 5c9a1ec6), I see:
>
> $ git grep '; *;' -- '**/*.[chy]' | grep -v 'for (.*; *;.*)'
Repeating on glibc.git commit 41488498:
elf/tst-deep1mod2.c: return baz () + xyzzy ();;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/gb18030.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/jisx0213.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/jisx0213.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/jisx0213.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
iconvdata/jisx0213.c:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
intl/loadmsgcat.c: goto out;;
misc/error.c: __attribute__ ((__format__ (__printf__, 5, 6)));;
nis/nis_defaults.c: return DEFAULT_TTL;;
nis/ypclnt.c: int result = YPERR_SUCCESS;;
nscd/dbg_log.h: __attribute__ ((__format__ (__printf__, 1, 2)));;
rt/tst-mqueue9.c: result = 1;;
sunrpc/rpc_svcout.c: f_print (fout, "%s\t(void) ioctl(i, TIOCNOTTY,
(char *)NULL);\n", sp);;
sysdeps/ieee754/k_standard.c: ?
"acosf" : "acosl");;
sysdeps/mach/hurd/fdopendir.c:
O_DIRECTORY | O_NOTRANS, 0);;
sysdeps/unix/sysv/linux/ia64/sysdep.h: ;;
sysdeps/unix/sysv/linux/s390/s390-32/getutline_r.c:default_symbol_version
(__getutline_r,
getutline_r, UTMP_COMPAT_BASE);;
sysdeps/x86_64/tst-auditmod6c.c: __m256i ymm = _mm256_set1_epi32
(0x12349876);;
Of those, the long lines of ;;;; are in long comments delimiting
embedded lisp code (those could be updated to use a different character
for the visual separator of the separator), and some of the .h files
have legitimate uses of embedded assembly in a #define (false positive).
And in thinking about false positives, I guess that means I also want
to allow optional whitespace and backslash prior to line end, to avoid
false negatives of normal C code embedded in multi-line macro
definitions. Overall, I'm fairly close.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature