mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-01-26 09:13:10 +00:00
Add more GCC warnings to the maintainer build.
* arscan.c: [SV 49112] Correct TEST printf() formatting. Recommended by Jaak Ristioja <jaak@ristioja.ee> * hash.c: Correct fprintf() formatting. * maintMakefile: Add extra GCC warning flags.
This commit is contained in:
parent
212cb00923
commit
b13dcfe501
3 changed files with 13 additions and 6 deletions
2
arscan.c
2
arscan.c
|
@ -137,7 +137,7 @@ VMS_get_member_info(struct dsc$descriptor_s *module, unsigned long *rfa)
|
||||||
|
|
||||||
#ifdef TEST
|
#ifdef TEST
|
||||||
/* When testing this code, it is useful to know the length returned */
|
/* When testing this code, it is useful to know the length returned */
|
||||||
printf("Input length = %d, actual = %d\n",
|
printf ("Input length = %d, actual = %u\n",
|
||||||
bufdesc.dsc$w_length, buffer_length);
|
bufdesc.dsc$w_length, buffer_length);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
6
hash.c
6
hash.c
|
@ -277,10 +277,10 @@ void
|
||||||
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
hash_print_stats (struct hash_table *ht, FILE *out_FILE)
|
||||||
{
|
{
|
||||||
/* GKM FIXME: honor NO_FLOAT */
|
/* GKM FIXME: honor NO_FLOAT */
|
||||||
fprintf (out_FILE, _("Load=%ld/%ld=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
fprintf (out_FILE, _("Load=%lu/%lu=%.0f%%, "), ht->ht_fill, ht->ht_size,
|
||||||
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
|
100.0 * (double) ht->ht_fill / (double) ht->ht_size);
|
||||||
fprintf (out_FILE, _("Rehash=%d, "), ht->ht_rehashes);
|
fprintf (out_FILE, _("Rehash=%u, "), ht->ht_rehashes);
|
||||||
fprintf (out_FILE, _("Collisions=%ld/%ld=%.0f%%"), ht->ht_collisions, ht->ht_lookups,
|
fprintf (out_FILE, _("Collisions=%lu/%lu=%.0f%%"), ht->ht_collisions, ht->ht_lookups,
|
||||||
(ht->ht_lookups
|
(ht->ht_lookups
|
||||||
? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)
|
? (100.0 * (double) ht->ht_collisions / (double) ht->ht_lookups)
|
||||||
: 0));
|
: 0));
|
||||||
|
|
|
@ -20,7 +20,14 @@ GNUWEBDIR ?= $(SRCROOTDIR)/gnu-www
|
||||||
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
MAKEWEBDIR ?= $(SRCROOTDIR)/make/make-web
|
||||||
|
|
||||||
# We like mondo-warnings!
|
# We like mondo-warnings!
|
||||||
AM_CFLAGS += -Wall -Wwrite-strings -Wextra -Wdeclaration-after-statement -Wshadow -Wpointer-arith -Wbad-function-cast
|
AM_CFLAGS += -Wall -Wextra -Werror -Wwrite-strings -Wshadow -Wpointer-arith \
|
||||||
|
-Wdeclaration-after-statement -Wbad-function-cast -Wformat-security \
|
||||||
|
-Wtype-limits -Wunused-but-set-parameter -Wlogical-op \
|
||||||
|
-Wignored-qualifiers -Wformat-signedness -Wduplicated-cond
|
||||||
|
|
||||||
|
# Unfortunately the Guile headers are sometimes broken. Convince GCC
|
||||||
|
# to treat them as system headers so warnings are ignored.
|
||||||
|
GUILE_CFLAGS := $(patsubst -I%,-isystem %,$(GUILE_CFLAGS))
|
||||||
|
|
||||||
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
MAKE_MAINTAINER_MODE := -DMAKE_MAINTAINER_MODE
|
||||||
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
AM_CPPFLAGS += $(MAKE_MAINTAINER_MODE)
|
||||||
|
|
Loading…
Reference in a new issue