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

[libvirt] [PATCH] mark a few diagnostics for translation



Avoid compile-time warnings:

>From 4597152e0c4a1e4a5ee85156496a8625b5cc4f42 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering redhat com>
Date: Mon, 26 Jan 2009 14:54:21 +0100
Subject: [PATCH 2/3] mark a few diagnostics for translation

* src/proxy_internal.c (xenProxyCommand): Mark a diagnostic.
* src/xen_unified.c (xenUnifiedOpen, xenUnifiedAddDomainInfo): Likewise.
---
 src/proxy_internal.c |    6 ++----
 src/xen_unified.c    |   11 +++++++----
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/proxy_internal.c b/src/proxy_internal.c
index 4d8be3a..d1255ae 100644
--- a/src/proxy_internal.c
+++ b/src/proxy_internal.c
@@ -1,7 +1,7 @@
 /*
  * proxy_client.c: client side of the communication with the libvirt proxy.
  *
- * Copyright (C) 2006, 2008 Red Hat, Inc.
+ * Copyright (C) 2006, 2008, 2009 Red Hat, Inc.
  *
  * See COPYING.LIB for the License of this software
  *
@@ -455,7 +455,7 @@ retry:
      */
     if ((res == NULL) || (res->version != PROXY_PROTO_VERSION) ||
         (res->len < sizeof(virProxyPacket))) {
-        virProxyError(conn, VIR_ERR_INTERNAL_ERROR,
+        virProxyError(conn, VIR_ERR_INTERNAL_ERROR, "%s",
                       _("Communication error with proxy: malformed packet\n"));
         goto error;
     }
@@ -1058,5 +1058,3 @@ xenProxyDomainGetOSType(virDomainPtr domain)

     return(ostype);
 }
-
-
diff --git a/src/xen_unified.c b/src/xen_unified.c
index 1a0f007..240b8f5 100644
--- a/src/xen_unified.c
+++ b/src/xen_unified.c
@@ -261,19 +261,21 @@ xenUnifiedOpen (virConnectPtr conn, virConnectAuthPtr auth, int flags)

     /* Allocate per-connection private data. */
     if (VIR_ALLOC(priv) < 0) {
-        xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating private data"));
+        xenUnifiedError (NULL, VIR_ERR_NO_MEMORY,
+                         "%s", _("allocating private data"));
         return VIR_DRV_OPEN_ERROR;
     }
     if (virMutexInit(&priv->lock) < 0) {
         xenUnifiedError (NULL, VIR_ERR_INTERNAL_ERROR,
-                         _("cannot initialise mutex"));
+                         "%s", _("cannot initialise mutex"));
         VIR_FREE(priv);
         return VIR_DRV_OPEN_ERROR;
     }

     /* Allocate callback list */
     if (VIR_ALLOC(cbList) < 0) {
-        xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating callback list"));
+        xenUnifiedError (NULL, VIR_ERR_NO_MEMORY,
+                         "%s", _("allocating callback list"));
         virMutexDestroy(&priv->lock);
         VIR_FREE(priv);
         return VIR_DRV_OPEN_ERROR;
@@ -1564,7 +1566,8 @@ xenUnifiedAddDomainInfo(xenUnifiedDomainInfoListPtr list,
     list->count++;
     return 0;
 memory_error:
-    xenUnifiedError (NULL, VIR_ERR_NO_MEMORY, _("allocating domain info"));
+    xenUnifiedError (NULL, VIR_ERR_NO_MEMORY,
+                     "%s", _("allocating domain info"));
     if (info)
         VIR_FREE(info->name);
     VIR_FREE(info);
--
1.6.1.1.347.g3f81d


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