1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2025-01-27 18:03:50 +03:00

Fix misc Win32 compile warnings

GCC >= 4.4 assumes the 'printf' attribute refers to the native
runtime libraries format specifiers. Thanks to gnulib, libvirt
has GNU format specifiers everywhere.  This means we need to
use 'gnu_printf' with GCC >= 4.4 to get correct compiler
checking of printf format specifiers.

* HACKING: Document new rules for ATTRIBUTE_FMT_PRINTF
* autobuild.sh, mingw32-libvirt.spec.in: Disable OpenNebula
  driver on mingw32 builds
* qemud/dispatch.h, qemud/qemu.h, src/buf.h src/internal.h,
  src/logging.h, src/security.h, src/sexpr.h, src/util.h,
  src/virterror_internal.h, src/xend_internal.c: Change
  over to ATTRIBUTE_FMT_PRINTF.
* src/virsh.c: Disable 'cd' and 'pwd' commands on Win32
  since they don't compile
* src/threads-win32.c: Add missing return value check
This commit is contained in:
Daniel P. Berrange 2009-07-23 16:07:32 +01:00
parent 7922e247f1
commit 899ae0d2b5
15 changed files with 125 additions and 39 deletions

View File

@ -312,7 +312,7 @@ gcc's printf attribute directive in the prototype. For example, here's
the one for virAsprintf, in util.h: the one for virAsprintf, in util.h:
int virAsprintf(char **strp, const char *fmt, ...) int virAsprintf(char **strp, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 2, 3); ATTRIBUTE_FMT_PRINTF(2, 3);
This makes it so gcc's -Wformat and -Wformat-security options can do This makes it so gcc's -Wformat and -Wformat-security options can do
their jobs and cross-check format strings with the number and types their jobs and cross-check format strings with the number and types

View File

@ -76,6 +76,7 @@ if [ -x /usr/bin/i686-pc-mingw32-gcc ]; then
--without-uml \ --without-uml \
--without-vbox \ --without-vbox \
--without-openvz \ --without-openvz \
--without-one \
--without-libvirtd --without-libvirtd
make make

View File

@ -52,6 +52,7 @@ MinGW Windows libvirt virtualization library.
--without-uml \ --without-uml \
--without-vbox \ --without-vbox \
--without-openvz \ --without-openvz \
--without-one \
--without-libvirtd --without-libvirtd
make make
@ -90,6 +91,7 @@ rm -rf $RPM_BUILD_ROOT
%{_mingw32_datadir}/libvirt/schemas/storagevol.rng %{_mingw32_datadir}/libvirt/schemas/storagevol.rng
%{_mingw32_datadir}/libvirt/schemas/nodedev.rng %{_mingw32_datadir}/libvirt/schemas/nodedev.rng
%{_mingw32_datadir}/libvirt/schemas/capability.rng %{_mingw32_datadir}/libvirt/schemas/capability.rng
%{_mingw32_datadir}/libvirt/schemas/interface.rng
%{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo %{_mingw32_datadir}/locale/*/LC_MESSAGES/libvirt.mo

View File

@ -41,7 +41,7 @@ remoteDispatchClientRequest (struct qemud_server *server,
void remoteDispatchFormatError (remote_error *rerr, void remoteDispatchFormatError (remote_error *rerr,
const char *fmt, ...) const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 2, 3); ATTRIBUTE_FMT_PRINTF(2, 3);
void remoteDispatchAuthError (remote_error *rerr); void remoteDispatchAuthError (remote_error *rerr);
void remoteDispatchGenericError (remote_error *rerr); void remoteDispatchGenericError (remote_error *rerr);

View File

@ -52,15 +52,61 @@
#ifdef HAVE_ANSIDECL_H #ifdef HAVE_ANSIDECL_H
#include <ansidecl.h> #include <ansidecl.h>
#endif #endif
#ifndef __GNUC_PREREQ
#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
#define __GNUC_PREREQ(maj,min) 0
#endif
#endif
/**
* ATTRIBUTE_UNUSED:
*
* Macro to flag conciously unused parameters to functions
*/
#ifndef ATTRIBUTE_UNUSED #ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED __attribute__((__unused__)) #define ATTRIBUTE_UNUSED __attribute__((__unused__))
#endif #endif
#ifndef ATTRIBUTE_FORMAT
#define ATTRIBUTE_FORMAT(args...) __attribute__((__format__ (args))) /**
#endif * ATTRIBUTE_FMT_PRINTF
*
* Macro used to check printf like functions, if compiling
* with gcc.
*
* We use gnulib which guarentees we always have GNU style
* printf format specifiers even on broken Win32 platforms
* hence we have to force 'gnu_printf' for new GCC
*/
#ifndef ATTRIBUTE_FMT_PRINTF
#if __GNUC_PREREQ (4, 4)
#define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (gnu_printf, fmtpos,argpos)))
#else #else
#define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (printf, fmtpos,argpos)))
#endif
#endif
#ifndef ATTRIBUTE_RETURN_CHECK
#if __GNUC_PREREQ (3, 4)
#define ATTRIBUTE_RETURN_CHECK __attribute__((__warn_unused_result__))
#else
#define ATTRIBUTE_RETURN_CHECK
#endif
#endif
#else
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED
#define ATTRIBUTE_FORMAT(...) #endif
#ifndef ATTRIBUTE_FMT_PRINTF
#define ATTRIBUTE_FMT_PRINTF(...)
#endif
#ifndef ATTRIBUTE_RETURN_CHECK
#define ATTRIBUTE_RETURN_CHECK
#endif
#endif #endif
#define qemudDebug DEBUG #define qemudDebug DEBUG
@ -213,7 +259,7 @@ struct qemud_server {
}; };
void qemudLog(int priority, const char *fmt, ...) void qemudLog(int priority, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf,2,3); ATTRIBUTE_FMT_PRINTF(2,3);

View File

@ -40,7 +40,7 @@ unsigned int virBufferUse(const virBufferPtr buf);
void virBufferAdd(const virBufferPtr buf, const char *str, int len); void virBufferAdd(const virBufferPtr buf, const char *str, int len);
void virBufferAddChar(const virBufferPtr buf, char c); void virBufferAddChar(const virBufferPtr buf, char c);
void virBufferVSprintf(const virBufferPtr buf, const char *format, ...) void virBufferVSprintf(const virBufferPtr buf, const char *format, ...)
ATTRIBUTE_FORMAT(printf, 2, 3); ATTRIBUTE_FMT_PRINTF(2, 3);
void virBufferStrcat(const virBufferPtr buf, ...); void virBufferStrcat(const virBufferPtr buf, ...);
void virBufferEscapeString(const virBufferPtr buf, const char *format, const char *str); void virBufferEscapeString(const virBufferPtr buf, const char *format, const char *str);
void virBufferURIEncodeString (const virBufferPtr buf, const char *str); void virBufferURIEncodeString (const virBufferPtr buf, const char *str);

View File

@ -67,8 +67,13 @@
#ifdef __GNUC__ #ifdef __GNUC__
#ifndef __GNUC_PREREQ #ifndef __GNUC_PREREQ
#if defined __GNUC__ && defined __GNUC_MINOR__
# define __GNUC_PREREQ(maj, min) \
((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
#else
#define __GNUC_PREREQ(maj,min) 0 #define __GNUC_PREREQ(maj,min) 0
#endif #endif
#endif
/** /**
* ATTRIBUTE_UNUSED: * ATTRIBUTE_UNUSED:
@ -80,13 +85,21 @@
#endif #endif
/** /**
* ATTRIBUTE_FORMAT * ATTRIBUTE_FMT_PRINTF
* *
* Macro used to check printf/scanf-like functions, if compiling * Macro used to check printf like functions, if compiling
* with gcc. * with gcc.
*
* We use gnulib which guarentees we always have GNU style
* printf format specifiers even on broken Win32 platforms
* hence we have to force 'gnu_printf' for new GCC
*/ */
#ifndef ATTRIBUTE_FORMAT #ifndef ATTRIBUTE_FMT_PRINTF
#define ATTRIBUTE_FORMAT(args...) __attribute__((__format__ (args))) #if __GNUC_PREREQ (4, 4)
#define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (gnu_printf, fmtpos,argpos)))
#else
#define ATTRIBUTE_FMT_PRINTF(fmtpos,argpos) __attribute__((__format__ (printf, fmtpos,argpos)))
#endif
#endif #endif
#ifndef ATTRIBUTE_RETURN_CHECK #ifndef ATTRIBUTE_RETURN_CHECK
@ -98,9 +111,15 @@
#endif #endif
#else #else
#ifndef ATTRIBUTE_UNUSED
#define ATTRIBUTE_UNUSED #define ATTRIBUTE_UNUSED
#define ATTRIBUTE_FORMAT(...) #endif
#ifndef ATTRIBUTE_FMT_PRINTF
#define ATTRIBUTE_FMT_PRINTF(...)
#endif
#ifndef ATTRIBUTE_RETURN_CHECK
#define ATTRIBUTE_RETURN_CHECK #define ATTRIBUTE_RETURN_CHECK
#endif
#endif /* __GNUC__ */ #endif /* __GNUC__ */
/* /*

View File

@ -121,6 +121,6 @@ extern int virLogParseFilters(const char *filters);
extern int virLogParseOutputs(const char *output); extern int virLogParseOutputs(const char *output);
extern void virLogMessage(const char *category, int priority, extern void virLogMessage(const char *category, int priority,
const char *funcname, long long linenr, int flags, const char *funcname, long long linenr, int flags,
const char *fmt, ...) ATTRIBUTE_FORMAT(printf, 6, 7); const char *fmt, ...) ATTRIBUTE_FMT_PRINTF(6, 7);
#endif #endif

View File

@ -82,7 +82,7 @@ virSecurityDriverVerify(virConnectPtr conn, virDomainDefPtr def);
void void
virSecurityReportError(virConnectPtr conn, int code, const char *fmt, ...) virSecurityReportError(virConnectPtr conn, int code, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 3, 4); ATTRIBUTE_FMT_PRINTF(3, 4);
/* Helpers */ /* Helpers */
void virSecurityDriverInit(virSecurityDriverPtr drv); void virSecurityDriverInit(virSecurityDriverPtr drv);

View File

@ -49,7 +49,7 @@ void sexpr_free(struct sexpr *sexpr);
const char *sexpr_node(const struct sexpr *sexpr, const char *node); const char *sexpr_node(const struct sexpr *sexpr, const char *node);
int sexpr_node_copy(const struct sexpr *sexpr, const char *node, char **dst); int sexpr_node_copy(const struct sexpr *sexpr, const char *node, char **dst);
const char *sexpr_fmt_node(const struct sexpr *sexpr, const char *fmt, ...) const char *sexpr_fmt_node(const struct sexpr *sexpr, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf,2,3); ATTRIBUTE_FMT_PRINTF(2,3);
struct sexpr *sexpr_lookup(const struct sexpr *sexpr, const char *node); struct sexpr *sexpr_lookup(const struct sexpr *sexpr, const char *node);
int sexpr_has(const struct sexpr *sexpr, const char *node); int sexpr_has(const struct sexpr *sexpr, const char *node);
#endif #endif

View File

@ -41,8 +41,10 @@ void virCondEventCleanup(void *data);
int virThreadInitialize(void) int virThreadInitialize(void)
{ {
virMutexInit(&virThreadLocalLock); if (virMutexInit(&virThreadLocalLock) < 0)
virThreadLocalInit(&virCondEvent, virCondEventCleanup); return -1;
if (virThreadLocalInit(&virCondEvent, virCondEventCleanup) < 0)
return -1;
return 0; return 0;
} }

View File

@ -160,7 +160,7 @@ int virMacAddrCompare (const char *mac1, const char *mac2);
void virSkipSpaces(const char **str); void virSkipSpaces(const char **str);
int virParseNumber(const char **str); int virParseNumber(const char **str);
int virAsprintf(char **strp, const char *fmt, ...) int virAsprintf(char **strp, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 2, 3); ATTRIBUTE_FMT_PRINTF(2, 3);
#define VIR_MAC_BUFLEN 6 #define VIR_MAC_BUFLEN 6
#define VIR_MAC_PREFIX_BUFLEN 3 #define VIR_MAC_PREFIX_BUFLEN 3

View File

@ -202,7 +202,7 @@ typedef struct __vshControl {
static const vshCmdDef commands[]; static const vshCmdDef commands[];
static void vshError(vshControl *ctl, int doexit, const char *format, ...) static void vshError(vshControl *ctl, int doexit, const char *format, ...)
ATTRIBUTE_FORMAT(printf, 3, 4); ATTRIBUTE_FMT_PRINTF(3, 4);
static int vshInit(vshControl *ctl); static int vshInit(vshControl *ctl);
static int vshDeinit(vshControl *ctl); static int vshDeinit(vshControl *ctl);
static void vshUsage(void); static void vshUsage(void);
@ -272,9 +272,9 @@ static virStorageVolPtr vshCommandOptVolBy(vshControl *ctl, const vshCmd *cmd,
VSH_BYUUID|VSH_BYNAME) VSH_BYUUID|VSH_BYNAME)
static void vshPrintExtra(vshControl *ctl, const char *format, ...) static void vshPrintExtra(vshControl *ctl, const char *format, ...)
ATTRIBUTE_FORMAT(printf, 2, 3); ATTRIBUTE_FMT_PRINTF(2, 3);
static void vshDebug(vshControl *ctl, int level, const char *format, ...) static void vshDebug(vshControl *ctl, int level, const char *format, ...)
ATTRIBUTE_FORMAT(printf, 3, 4); ATTRIBUTE_FMT_PRINTF(3, 4);
/* XXX: add batch support */ /* XXX: add batch support */
#define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__) #define vshPrint(_ctl, ...) fprintf(stdout, __VA_ARGS__)
@ -495,6 +495,8 @@ cmdConnect(vshControl *ctl, const vshCmd *cmd)
return ctl->conn ? TRUE : FALSE; return ctl->conn ? TRUE : FALSE;
} }
#ifndef WIN32
/* /*
* "console" command * "console" command
*/ */
@ -510,8 +512,6 @@ static const vshCmdOptDef opts_console[] = {
{NULL, 0, 0, NULL} {NULL, 0, 0, NULL}
}; };
#ifndef __MINGW32__
static int static int
cmdRunConsole(vshControl *ctl, virDomainPtr dom) cmdRunConsole(vshControl *ctl, virDomainPtr dom)
{ {
@ -574,17 +574,6 @@ cmdRunConsole(vshControl *ctl, virDomainPtr dom)
return ret; return ret;
} }
#else /* __MINGW32__ */
static int
cmdRunConsole(vshControl *ctl, virDomainPtr dom ATTRIBUTE_UNUSED)
{
vshError (ctl, FALSE, "%s", _("console not implemented on this platform"));
return FALSE;
}
#endif /* __MINGW32__ */
static int static int
cmdConsole(vshControl *ctl, const vshCmd *cmd) cmdConsole(vshControl *ctl, const vshCmd *cmd)
{ {
@ -603,6 +592,9 @@ cmdConsole(vshControl *ctl, const vshCmd *cmd)
return ret; return ret;
} }
#endif /* WIN32 */
/* /*
* "list" command * "list" command
*/ */
@ -931,7 +923,9 @@ static const vshCmdInfo info_create[] = {
static const vshCmdOptDef opts_create[] = { static const vshCmdOptDef opts_create[] = {
{"file", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("file containing an XML domain description")}, {"file", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("file containing an XML domain description")},
#ifndef WIN32
{"console", VSH_OT_BOOL, 0, gettext_noop("attach to console after creation")}, {"console", VSH_OT_BOOL, 0, gettext_noop("attach to console after creation")},
#endif
{NULL, 0, 0, NULL} {NULL, 0, 0, NULL}
}; };
@ -943,7 +937,9 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd)
int found; int found;
int ret = TRUE; int ret = TRUE;
char *buffer; char *buffer;
#ifndef WIN32
int console = vshCommandOptBool(cmd, "console"); int console = vshCommandOptBool(cmd, "console");
#endif
if (!vshConnectionUsability(ctl, ctl->conn, TRUE)) if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE; return FALSE;
@ -961,8 +957,10 @@ cmdCreate(vshControl *ctl, const vshCmd *cmd)
if (dom != NULL) { if (dom != NULL) {
vshPrint(ctl, _("Domain %s created from %s\n"), vshPrint(ctl, _("Domain %s created from %s\n"),
virDomainGetName(dom), from); virDomainGetName(dom), from);
#ifndef WIN32
if (console) if (console)
cmdRunConsole(ctl, dom); cmdRunConsole(ctl, dom);
#endif
virDomainFree(dom); virDomainFree(dom);
} else { } else {
vshError(ctl, FALSE, _("Failed to create domain from %s"), from); vshError(ctl, FALSE, _("Failed to create domain from %s"), from);
@ -1083,7 +1081,9 @@ static const vshCmdInfo info_start[] = {
static const vshCmdOptDef opts_start[] = { static const vshCmdOptDef opts_start[] = {
{"domain", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the inactive domain")}, {"domain", VSH_OT_DATA, VSH_OFLAG_REQ, gettext_noop("name of the inactive domain")},
#ifndef WIN32
{"console", VSH_OT_BOOL, 0, gettext_noop("attach to console after creation")}, {"console", VSH_OT_BOOL, 0, gettext_noop("attach to console after creation")},
#endif
{NULL, 0, 0, NULL} {NULL, 0, 0, NULL}
}; };
@ -1092,7 +1092,9 @@ cmdStart(vshControl *ctl, const vshCmd *cmd)
{ {
virDomainPtr dom; virDomainPtr dom;
int ret = TRUE; int ret = TRUE;
#ifndef WIN32
int console = vshCommandOptBool(cmd, "console"); int console = vshCommandOptBool(cmd, "console");
#endif
if (!vshConnectionUsability(ctl, ctl->conn, TRUE)) if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
return FALSE; return FALSE;
@ -1109,8 +1111,10 @@ cmdStart(vshControl *ctl, const vshCmd *cmd)
if (virDomainCreate(dom) == 0) { if (virDomainCreate(dom) == 0) {
vshPrint(ctl, _("Domain %s started\n"), vshPrint(ctl, _("Domain %s started\n"),
virDomainGetName(dom)); virDomainGetName(dom));
#ifndef WIN32
if (console) if (console)
cmdRunConsole(ctl, dom); cmdRunConsole(ctl, dom);
#endif
} else { } else {
vshError(ctl, FALSE, _("Failed to start domain %s"), vshError(ctl, FALSE, _("Failed to start domain %s"),
virDomainGetName(dom)); virDomainGetName(dom));
@ -6562,6 +6566,8 @@ editReadBackFile (vshControl *ctl, const char *filename)
return ret; return ret;
} }
#ifndef WIN32
/* /*
* "cd" command * "cd" command
*/ */
@ -6603,6 +6609,9 @@ cmdCd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
return 0; return 0;
} }
#endif
#ifndef WIN32
/* /*
* "pwd" command * "pwd" command
*/ */
@ -6638,6 +6647,7 @@ cmdPwd(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
free (cwd); free (cwd);
return !err; return !err;
} }
#endif
/* /*
* "edit" command * "edit" command
@ -6802,9 +6812,13 @@ static const vshCmdDef commands[] = {
{"attach-interface", cmdAttachInterface, opts_attach_interface, info_attach_interface}, {"attach-interface", cmdAttachInterface, opts_attach_interface, info_attach_interface},
{"autostart", cmdAutostart, opts_autostart, info_autostart}, {"autostart", cmdAutostart, opts_autostart, info_autostart},
{"capabilities", cmdCapabilities, NULL, info_capabilities}, {"capabilities", cmdCapabilities, NULL, info_capabilities},
#ifndef WIN32
{"cd", cmdCd, opts_cd, info_cd}, {"cd", cmdCd, opts_cd, info_cd},
#endif
{"connect", cmdConnect, opts_connect, info_connect}, {"connect", cmdConnect, opts_connect, info_connect},
#ifndef WIN32
{"console", cmdConsole, opts_console, info_console}, {"console", cmdConsole, opts_console, info_console},
#endif
{"create", cmdCreate, opts_create, info_create}, {"create", cmdCreate, opts_create, info_create},
{"start", cmdStart, opts_start, info_start}, {"start", cmdStart, opts_start, info_start},
{"destroy", cmdDestroy, opts_destroy, info_destroy}, {"destroy", cmdDestroy, opts_destroy, info_destroy},
@ -6882,7 +6896,9 @@ static const vshCmdDef commands[] = {
{"pool-undefine", cmdPoolUndefine, opts_pool_undefine, info_pool_undefine}, {"pool-undefine", cmdPoolUndefine, opts_pool_undefine, info_pool_undefine},
{"pool-uuid", cmdPoolUuid, opts_pool_uuid, info_pool_uuid}, {"pool-uuid", cmdPoolUuid, opts_pool_uuid, info_pool_uuid},
#ifndef WIN32
{"pwd", cmdPwd, NULL, info_pwd}, {"pwd", cmdPwd, NULL, info_pwd},
#endif
{"quit", cmdQuit, NULL, info_quit}, {"quit", cmdQuit, NULL, info_quit},
{"reboot", cmdReboot, opts_reboot, info_reboot}, {"reboot", cmdReboot, opts_reboot, info_reboot},
{"restore", cmdRestore, opts_restore, info_restore}, {"restore", cmdRestore, opts_restore, info_restore},

View File

@ -46,7 +46,7 @@ void virRaiseErrorFull(virConnectPtr conn,
int int1, int int1,
int int2, int int2,
const char *fmt, ...) const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 13, 14); ATTRIBUTE_FMT_PRINTF(13, 14);
/* Includes 'dom' and 'net' for compatbility, but they're ignored */ /* Includes 'dom' and 'net' for compatbility, but they're ignored */
#define virRaiseError(conn, dom, net, domain, code, level, \ #define virRaiseError(conn, dom, net, domain, code, level, \
@ -61,7 +61,7 @@ void virReportErrorHelper(virConnectPtr conn, int domcode, int errcode,
const char *funcname ATTRIBUTE_UNUSED, const char *funcname ATTRIBUTE_UNUSED,
size_t linenr ATTRIBUTE_UNUSED, size_t linenr ATTRIBUTE_UNUSED,
const char *fmt, ...) const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 7, 8); ATTRIBUTE_FMT_PRINTF(7, 8);
void virReportSystemErrorFull(virConnectPtr conn, void virReportSystemErrorFull(virConnectPtr conn,
int domcode, int domcode,
@ -70,7 +70,7 @@ void virReportSystemErrorFull(virConnectPtr conn,
const char *funcname, const char *funcname,
size_t linenr, size_t linenr,
const char *fmt, ...) const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 7, 8); ATTRIBUTE_FMT_PRINTF(7, 8);
#define virReportSystemError(conn, theerrno, fmt,...) \ #define virReportSystemError(conn, theerrno, fmt,...) \
virReportSystemErrorFull((conn), \ virReportSystemErrorFull((conn), \

View File

@ -582,7 +582,7 @@ xend_op(virConnectPtr xend, const char *name, const char *key, ...)
* Returns a parsed S-Expression in case of success, NULL in case of failure * Returns a parsed S-Expression in case of success, NULL in case of failure
*/ */
static struct sexpr *sexpr_get(virConnectPtr xend, const char *fmt, ...) static struct sexpr *sexpr_get(virConnectPtr xend, const char *fmt, ...)
ATTRIBUTE_FORMAT(printf,2,3); ATTRIBUTE_FMT_PRINTF(2,3);
static struct sexpr * static struct sexpr *
sexpr_get(virConnectPtr xend, const char *fmt, ...) sexpr_get(virConnectPtr xend, const char *fmt, ...)