This has happened several times since commit cbc51277aa4de1f.  It
complicates bisecting and patch review.

Either the warnings should be disabled by default (I would sadly vote
against it, however), or using of -Werror=* should be more enforced
somehow to minimize situations like this in future.

Thanks, Pavel

----
$ ./bootstrap && ./configure && make
....
make
  CC       suffix.o
  CC       system.o
  CC       tar.o
tar.c:1084:1: error: no previous prototype for ‘option_set_in_cl’ 
[-Werror=missing-prototypes]
 option_set_in_cl (int id)
 ^
tar.c:1094:1: error: no previous prototype for ‘optloc_eq’ 
[-Werror=missing-prototypes]
 optloc_eq (struct option_locus *a, struct option_locus *b)
 ^
tar.c:1462:1: error: no previous prototype for ‘set_old_files_option’ 
[-Werror=missing-prototypes]
 set_old_files_option (int code, struct option_locus *loc)
 ^
tar.c: In function ‘set_old_files_option’:
tar.c:1466:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--overwrite-dir",
     ^
tar.c:1467:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--no-overwrite-dir",
     ^
tar.c:1468:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--overwrite",
     ^
tar.c:1469:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--unlink-first",
     ^
tar.c:1470:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--keep-old-files",
     ^
tar.c:1471:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--skip-old-files",
     ^
tar.c:1472:5: error: initialization discards ‘const’ qualifier from pointer 
target type [-Werror=discarded-qualifiers]
     "--keep-newer-files"
     ^
tar.c: At top level:
tar.c:2464:1: error: function declaration isn’t a prototype 
[-Werror=strict-prototypes]
 parse_default_options ()
 ^
tar.c: In function ‘parse_default_options’:
tar.c:2464:1: error: old-style function definition 
[-Werror=old-style-definition]
tar.c:2468:10: error: missing initializer for field ‘prev’ of ‘struct 
option_locus’ [-Werror=missing-field-initializers]
   struct option_locus loc = { OPTS_ENVIRON, "TAR_OPTIONS", 0 };
          ^
In file included from tar.c:39:0:
common.h:795:24: note: ‘prev’ declared here
   struct option_locus *prev;  /* Previous occurrence of the option of same
                        ^
tar.c: In function ‘decode_options’:
tar.c:2490:10: error: missing initializer for field ‘name’ of ‘struct 
option_locus’ [-Werror=missing-field-initializers]
   struct option_locus loc = { OPTS_COMMAND_LINE };
          ^
In file included from tar.c:39:0:
common.h:793:15: note: ‘name’ declared here
   char const *name;           /* File or variable name */
               ^
cc1: all warnings being treated as errors
Makefile:1380: recipe for target 'tar.o' failed
make[2]: *** [tar.o] Error 1
make[2]: Leaving directory '/home/praiskup/rh/projects/tar/src'
Makefile:1350: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/praiskup/rh/projects/tar'
Makefile:1290: recipe for target 'all' failed
make: *** [all] Error 2



Reply via email to