avoid format string warnings

* src/openvz_driver.c (ADD_ARG_LIT): Add "%s" arg before _(...).
* src/qemu_driver.c (PCI_ATTACH_OK_MSG): Likewise.
* src/util.c (virExec, virRun): Likewise.
This commit is contained in:
Jim Meyering 2008-11-14 14:19:37 +00:00
parent df285bdd8d
commit 94359e16d3
4 changed files with 12 additions and 5 deletions

View File

@ -1,3 +1,10 @@
Fri Nov 14 13:22:36 +0100 2008 Jim Meyering <meyering@redhat.com>
avoid format string warnings
* src/openvz_driver.c (ADD_ARG_LIT): Add "%s" arg before _(...).
* src/qemu_driver.c (PCI_ATTACH_OK_MSG): Likewise.
* src/util.c (virExec, virRun): Likewise.
Fri Nov 14 09:38:22 CET 2008 Daniel Veillard <veillard@redhat.com>
* qemud/remote.c qemud/remote_dispatch_localvars.h

View File

@ -426,7 +426,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
dev_name_ve = openvzGenerateContainerVethName(veid);
if (dev_name_ve == NULL) {
openvzError(conn, VIR_ERR_INTERNAL_ERROR,
_("Could not generate eth name for container"));
"%s", _("Could not generate eth name for container"));
rc = -1;
goto exit;
}
@ -437,7 +437,7 @@ openvzDomainSetNetwork(virConnectPtr conn, const char *vpsid,
net->ifname = openvzGenerateVethName(veid, dev_name_ve);
if (net->ifname == NULL) {
openvzError(conn, VIR_ERR_INTERNAL_ERROR,
_("Could not generate veth name"));
"%s", _("Could not generate veth name"));
rc = -1;
VIR_FREE(dev_name_ve);
goto exit;

View File

@ -2611,7 +2611,7 @@ static int qemudDomainAttachPciDiskDevice(virDomainPtr dom, virDomainDeviceDefPt
s += strlen(PCI_ATTACH_OK_MSG);
if (virStrToLong_i ((const char*)s, &dummy, 10, &dev->data.disk->slotnum) == -1)
qemudLog(QEMUD_WARN, _("Unable to parse slot number\n"));
qemudLog(QEMUD_WARN, "%s", _("Unable to parse slot number\n"));
} else {
qemudReportError (dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED,
_("adding %s disk failed"), type);

View File

@ -406,7 +406,7 @@ virExec(virConnectPtr conn,
char *argv_str;
if ((argv_str = virArgvToString(argv)) == NULL) {
ReportError(conn, VIR_ERR_NO_MEMORY, _("command debug string"));
ReportError(conn, VIR_ERR_NO_MEMORY, "%s", _("command debug string"));
return -1;
}
DEBUG0(argv_str);
@ -523,7 +523,7 @@ virRun(virConnectPtr conn,
char *argv_str = NULL;
if ((argv_str = virArgvToString(argv)) == NULL) {
ReportError(conn, VIR_ERR_NO_MEMORY, _("command debug string"));
ReportError(conn, VIR_ERR_NO_MEMORY, "%s", _("command debug string"));
goto error;
}
DEBUG0(argv_str);