commit 6c7443a65369d0bd236d9eb19e59df6639c91eec from: David du Colombier <0intro@gmail.com> date: Tue Oct 21 12:22:12 2014 UTC fix clang 3.4 warnings and ignore uninteresting ones fixed warnings: src/cmd/fossil/disk.c:37:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator] src/cmd/fossil/disk.c:38:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator] src/cmd/fossil/disk.c:39:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator] src/cmd/fossil/disk.c:40:13: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator] src/cmd/fossil/disk.c:41:14: warning: use of GNU 'missing =' extension in designator [-Wgnu-designator] src/libndb/ndbreorder.c:41:55: warning: for loop has empty body [-Wempty-body] ignored warnings: src/cmd/acid/dbg.y:393:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/bc.y:1327:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/bc.y:1327:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/grep/grep.y:420:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/grep/grep.y:420:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/hoc/hoc.y:692:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/hoc/hoc.y:692:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/lex/parser.y:886:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/rc/syn.y:303:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/cmd/units.y:1003:9: warning: array index -1 is before the beginning of the array [-Warray-bounds] src/libregexp/regcomp.c:19:16: warning: variable 'reprog' is not needed and will not be emitted [-Wunneeded-internal-declaration] LGTM=rsc R=rsc https://codereview.appspot.com/158250043 commit - 2763a6d8324fc5e1296e9a50a067ec04d52c581f commit + 6c7443a65369d0bd236d9eb19e59df6639c91eec blob - 85aa0822a45f0dbe36abe6a8079606a262fb03b2 blob + 64d5c3a2e077be72c602800237108821f6c9ede5 --- bin/9c +++ bin/9c @@ -67,6 +67,8 @@ useclang() -Wno-unused-value \ -Wno-array-bounds \ -Wno-gnu-designator \ + -Wno-array-bounds \ + -Wno-unneeded-internal-declaration \ -fsigned-char \ -fno-caret-diagnostics \ " blob - 04ea5cdd8de38c94a78362904ba1ef4ad0c04a9f blob + 61370dd86f1501265d745258482f559264ee2518 --- src/cmd/fossil/disk.c +++ src/cmd/fossil/disk.c @@ -34,11 +34,11 @@ struct Disk { /* keep in sync with Part* enum in dat.h */ static char *partname[] = { - [PartError] "error", - [PartSuper] "super", - [PartLabel] "label", - [PartData] "data", - [PartVenti] "venti", + [PartError] = "error", + [PartSuper] = "super", + [PartLabel] = "label", + [PartData] = "data", + [PartVenti] = "venti", }; Disk * blob - 167d0a0acd48418b21fecfb5d774d8040c603de8 blob + 390d7818f1bbe88fc8bbc9dad731bc95ee34f9e8 --- src/libndb/ndbreorder.c +++ src/libndb/ndbreorder.c @@ -38,7 +38,7 @@ ndbreorder(Ndbtuple *t, Ndbtuple *x) if(x != last->line){ /* find entry before x */ - for(prev = last; prev->line != x; prev = prev->line); + for(prev = last; prev->line != x; prev = prev->line) ; /* detach line */