Commit ac41a6206fe9e1506010cd0aa9cf56ed3b37ae19

Authored by blueswir1
1 parent 7ccfb2eb

Enable gcc flag -Wwrite-strings

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5207 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 2 changed files with 4 additions and 2 deletions
Makefile.target
@@ -73,7 +73,8 @@ endif @@ -73,7 +73,8 @@ endif
73 PROGS=$(QEMU_PROG) 73 PROGS=$(QEMU_PROG)
74 74
75 # We require -O2 to avoid the stack setup prologue in EXIT_TB 75 # We require -O2 to avoid the stack setup prologue in EXIT_TB
76 -OP_CFLAGS := -Wall -Wundef -Wendif-labels -O2 -g -fno-strict-aliasing 76 +OP_CFLAGS := -O2 -g -fno-strict-aliasing
  77 +OP_CFLAGS += -Wall -Wundef -Wendif-labels -Wwrite-strings
77 78
78 # cc-option 79 # cc-option
79 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0) 80 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
configure
@@ -346,7 +346,8 @@ for opt do @@ -346,7 +346,8 @@ for opt do
346 done 346 done
347 347
348 # default flags for all hosts 348 # default flags for all hosts
349 -CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -O2 -g -fno-strict-aliasing" 349 +CFLAGS="$CFLAGS -O2 -g -fno-strict-aliasing"
  350 +CFLAGS="$CFLAGS -Wall -Wundef -Wendif-labels -Wwrite-strings"
350 LDFLAGS="$LDFLAGS -g" 351 LDFLAGS="$LDFLAGS -g"
351 if test "$werror" = "yes" ; then 352 if test "$werror" = "yes" ; then
352 CFLAGS="$CFLAGS -Werror" 353 CFLAGS="$CFLAGS -Werror"