[ostree] Fix warning about format string not being a string literal



commit 2a14f2cd520dfc5487546eb0b9d9c44e741471b4
Author: Tobias Hunger <tobias hunger gmail com>
Date:   Fri Aug 30 10:34:55 2013 +0200

    Fix warning about format string not being a string literal

 src/ostree/ot-builtin-commit.c |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)
---
diff --git a/src/ostree/ot-builtin-commit.c b/src/ostree/ot-builtin-commit.c
index ace5aeb..c26d265 100644
--- a/src/ostree/ot-builtin-commit.c
+++ b/src/ostree/ot-builtin-commit.c
@@ -143,14 +143,6 @@ commit_editor (OstreeRepo     *repo,
                GCancellable   *cancellable,
                GError        **error)
 {
-  const char *template =
-      "\n"
-      "# Please enter the commit message for your changes. The first line will\n"
-      "# become the subject, and the remainder the body. Lines starting\n"
-      "# with '#' will be ignored, and an empty message aborts the commit.\n"
-      "#\n"
-      "# Branch: %s\n";
-
   gs_free char *input = NULL;
   gs_free char *output = NULL;
   gboolean ret = FALSE;
@@ -161,7 +153,12 @@ commit_editor (OstreeRepo     *repo,
   *subject = NULL;
   *body = NULL;
 
-  input = g_strdup_printf (template, branch);
+  input = g_strdup_printf ("\n"
+      "# Please enter the commit message for your changes. The first line will\n"
+      "# become the subject, and the remainder the body. Lines starting\n"
+      "# with '#' will be ignored, and an empty message aborts the commit.\n"
+      "#\n"
+      "# Branch: %s\n", branch);
 
   output = ot_editor_prompt (repo, input, cancellable, error);
   if (output == NULL)


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