[PATCH] Fix several warnings about a non-literal format string

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

 



They only popped up during --disable-nls build. Without this configure
option, gcc wasn't able to detect them.
---

I already pushed this since it's both trivial and build-breaking.

 src/esx/esx_vmx.c   |    2 +-
 src/util/iptables.c |    2 +-
 src/util/network.c  |    4 ++--
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/esx/esx_vmx.c b/src/esx/esx_vmx.c
index 0a26614..36818df 100644
--- a/src/esx/esx_vmx.c
+++ b/src/esx/esx_vmx.c
@@ -2611,7 +2611,7 @@ esxVMX_FormatConfig(esxVMX_Context *ctx, virCapsPtr caps, virDomainDefPtr def,
 
     /* def:maxvcpus -> vmx:numvcpus */
     if (def->vcpus != def->maxvcpus) {
-        ESX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED,
+        ESX_ERROR(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                   _("No support for domain XML entry 'vcpu' attribute "
                     "'current'"));
         goto cleanup;
diff --git a/src/util/iptables.c b/src/util/iptables.c
index fc656b9..fe78d1c 100644
--- a/src/util/iptables.c
+++ b/src/util/iptables.c
@@ -334,7 +334,7 @@ static char *iptablesFormatNetwork(virSocketAddr *netaddr,
 
     if (!VIR_SOCKET_IS_FAMILY(netaddr, AF_INET) ||
         !VIR_SOCKET_IS_FAMILY(netmask, AF_INET)) {
-        iptablesError(VIR_ERR_CONFIG_UNSUPPORTED,
+        iptablesError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
                       _("Only IPv4 addresses can be used with iptables"));
         return NULL;
     }
diff --git a/src/util/network.c b/src/util/network.c
index 81ac228..1abe78b 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -80,7 +80,7 @@ virSocketParseAddr(const char *val, virSocketAddrPtr addr, int family) {
     int err;
 
     if (val == NULL) {
-        virSocketError(VIR_ERR_INVALID_ARG, _("Missing address"));
+        virSocketError(VIR_ERR_INVALID_ARG, "%s", _("Missing address"));
         return -1;
     }
 
@@ -173,7 +173,7 @@ virSocketFormatAddrFull(virSocketAddrPtr addr,
     int err;
 
     if (addr == NULL) {
-        virSocketError(VIR_ERR_INVALID_ARG, _("Missing address"));
+        virSocketError(VIR_ERR_INVALID_ARG, "%s", _("Missing address"));
         return NULL;
     }
 
-- 
1.7.3.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]