Patchwork Re: [PATCH] configure: Add compiler option -Wmissing-format-attribute

login
register
mail settings
Submitter Stefan Weil
Date Nov. 15, 2010, 9:03 p.m.
Message ID <4CE1A029.4090800@mail.berlios.de>
Download mbox
Permalink /patch/71301/
State New
Headers show

Pull-request

git://git.weilnetz.de/git/qemu for-blueswirl

Comments

Stefan Weil - Nov. 15, 2010, 9:03 p.m.
Am 15.11.2010 21:22, schrieb Stefan Weil:
> With the previous patches, hopefully all functions with
> printf like arguments use gcc's format checking.
>
> This was tested with default build configuration on linux
> and windows hosts (including some cross compilations),
> so chances are good that there remain few (if any) functions
> without format checking.
>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
[snip]

Hi,

to make testing and committing of this and the previous
patches easier, I have now set up a git repository which
contains all of them (more at the bottom of this mail).

I'd appreciate if someone could test compilation especially
with these environment (which I could not test):

* BSD / Darwin host
* Special configure options

This was my configuration (+ cross compilations for windows / mips / 
powerpc):

$ ./configure --enable-debug-tcg --trace-backend=simple 
--audio-drv-list="oss,alsa,sdl,esd,pa" --enable-attr
Install prefix    /usr/local
BIOS directory    /usr/local/share/qemu
binary directory  /usr/local/bin
config directory  /usr/local/etc
Manual directory  /usr/local/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path       /home/stefan/src/qemu
C compiler        gcc
Host C compiler   gcc
CFLAGS            -O2 -g
QEMU_CFLAGS       -Werror -m64 -I. -I$(SRC_PATH) -D_FORTIFY_SOURCE=2 
-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-Wstrict-prototypes -Wredundant-decls -Wmissing-format-attribute -Wall 
-Wundef -Wendif-labels -Wwrite-strings -Wmissing-prototypes 
-fno-strict-aliasing  -fstack-protector-all -Wempty-body 
-Wnested-externs -Wformat-security -Wformat-y2k -Winit-self 
-Wignored-qualifiers -Wold-style-declaration -Wold-style-definition 
-Wtype-limits
LDFLAGS           -Wl,--warn-common -m64 -g
make              make
install           install
host CPU          x86_64
host big endian   no
target list       i386-softmmu x86_64-softmmu arm-softmmu cris-softmmu 
m68k-softmmu microblaze-softmmu mips-softmmu mipsel-softmmu 
mips64-softmmu mips64el-softmmu ppc-softmmu ppcemb-softmmu ppc64-softmmu 
sh4-softmmu sh4eb-softmmu sparc-softmmu sparc64-softmmu i386-linux-user 
x86_64-linux-user alpha-linux-user arm-linux-user armeb-linux-user 
cris-linux-user m68k-linux-user microblaze-linux-user mips-linux-user 
mipsel-linux-user ppc-linux-user ppc64-linux-user ppc64abi32-linux-user 
sh4-linux-user sh4eb-linux-user sparc-linux-user sparc64-linux-user 
sparc32plus-linux-user
tcg debug enabled yes
Mon debug enabled no
gprof enabled     no
sparse enabled    no
strip binaries    yes
profiler          no
static build      no
-Werror enabled   yes
SDL support       yes
curses support    yes
curl support      yes
check support     no
mingw32 support   no
Audio drivers     oss alsa sdl esd pa
Extra audio cards ac97 es1370 sb16 hda
Block whitelist
Mixer emulation   no
VNC TLS support   no
VNC SASL support  no
VNC JPEG support  yes
VNC PNG support   yes
VNC thread        no
xen support       no
brlapi support    no
bluez  support    no
Documentation     yes
NPTL support      yes
GUEST_BASE        yes
PIE user targets  no
vde support       yes
IO thread         no
Linux AIO support yes
ATTR/XATTR support yes
Install blobs     yes
KVM support       yes
fdt support       no
preadv support    yes
fdatasync         yes
madvise           yes
posix_madvise     yes
uuid support      yes
vhost-net support no
Trace backend     simple
Trace output file trace-<pid>
spice support     no

Regards,
Stefan



The following changes since commit cf2c1839a955482f2e208d7400594bf076c222f2:

   add copyright to spiceaudio (2010-11-11 17:59:25 +0300)

are available in the git repository at:
   git://git.weilnetz.de/git/qemu for-blueswirl

Stefan Weil (7):
       *-dis: Replace fprintf_ftype by fprintf_function (format checking)
       target-sparc: Use fprintf_function (format checking)
       trace: Use fprintf_function (format checking)
       audio: Use GCC_FMT_ATTR (format checking)
       darwin-user: Use GCC_FMT_ATTR (format checking)
       slirp: Remove unused code for bad sprintf
       configure: Add compiler option -Wmissing-format-attribute

  HACKING                |    3 ---
  alpha-dis.c            |    3 +++
  arm-dis.c              |   14 +++++++-------
  audio/audio_pt_int.c   |    3 ++-
  configure              |    1 +
  darwin-user/machload.c |    2 +-
  darwin-user/qemu.h     |    2 +-
  dis-asm.h              |   10 ++--------
  m68k-dis.c             |    2 +-
  microblaze-dis.c       |    2 +-
  mips-dis.c             |    2 --
  sh4-dis.c              |   16 +++++-----------
  simpletrace.h          |    6 +++---
  slirp/misc.c           |   42 ------------------------------------------
  slirp/slirp.h          |   14 --------------
  slirp/slirp_config.h   |    6 ------
  target-sparc/cpu.h     |    4 ++--
  17 files changed, 29 insertions(+), 103 deletions(-)