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
This commit is contained in:
parent
2763a6d832
commit
6c7443a653
3 changed files with 8 additions and 6 deletions
2
bin/9c
2
bin/9c
|
|
@ -67,6 +67,8 @@ useclang()
|
||||||
-Wno-unused-value \
|
-Wno-unused-value \
|
||||||
-Wno-array-bounds \
|
-Wno-array-bounds \
|
||||||
-Wno-gnu-designator \
|
-Wno-gnu-designator \
|
||||||
|
-Wno-array-bounds \
|
||||||
|
-Wno-unneeded-internal-declaration \
|
||||||
-fsigned-char \
|
-fsigned-char \
|
||||||
-fno-caret-diagnostics \
|
-fno-caret-diagnostics \
|
||||||
"
|
"
|
||||||
|
|
|
||||||
|
|
@ -34,11 +34,11 @@ struct Disk {
|
||||||
|
|
||||||
/* keep in sync with Part* enum in dat.h */
|
/* keep in sync with Part* enum in dat.h */
|
||||||
static char *partname[] = {
|
static char *partname[] = {
|
||||||
[PartError] "error",
|
[PartError] = "error",
|
||||||
[PartSuper] "super",
|
[PartSuper] = "super",
|
||||||
[PartLabel] "label",
|
[PartLabel] = "label",
|
||||||
[PartData] "data",
|
[PartData] = "data",
|
||||||
[PartVenti] "venti",
|
[PartVenti] = "venti",
|
||||||
};
|
};
|
||||||
|
|
||||||
Disk *
|
Disk *
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ ndbreorder(Ndbtuple *t, Ndbtuple *x)
|
||||||
if(x != last->line){
|
if(x != last->line){
|
||||||
|
|
||||||
/* find entry before x */
|
/* find entry before x */
|
||||||
for(prev = last; prev->line != x; prev = prev->line);
|
for(prev = last; prev->line != x; prev = prev->line)
|
||||||
;
|
;
|
||||||
|
|
||||||
/* detach line */
|
/* detach line */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue