[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for q

From: Sheng Yang
Subject: [Qemu-devel] "Enable _FORTIFY_SOURCE=2" result in building failure for qemu-img.c
Date: Thu, 4 Feb 2010 15:04:52 +0800
User-agent: KMail/1.12.2 (Linux/2.6.31-17-generic; KDE/4.3.2; x86_64; ; )

Got this building failure:

In file included from qemu-img.c:68:                                            
qemu-img-cmds.h:22:1: error: unterminated argument list invoking macro 
cc1: warnings being treated as errors
qemu-img.c: In function ‘help’:
qemu-img.c:95: warning: statement with no effect
qemu-img.c:71: error: expected ‘;’ before string constant
qemu-img.c:95: error: expected statement before ‘)’ token
make: *** [qemu-img.o] Error 1

And git bisect figure out the commit: 84958305, "Enable _FORTIFY_SOURCE=2".

And the code is here:

    printf("qemu-img version " QEMU_VERSION ", Copyright (c) 2004-2008 Fabrice 
           "usage: qemu-img command [command options]\n"
           "QEMU disk image utility\n"
           "Command syntax:\n"
#define DEF(option, callback, arg_string)        \
           "  " arg_string "\n"
#include "qemu-img-cmds.h"
#undef DEF
#undef GEN_DOCS

Seems gcc take "printf" as a marco. I added a "#undef printf" before the line, 
then it works...

So any clue on what's happened and how to fix?

GCC version is 4.1.2.

Yang, Sheng

reply via email to

[Prev in Thread] Current Thread [Next in Thread]