[ostree] switchroot: Suppress compiler warning for asprintf



commit c563d07cb6cc3be684b2d0fef3602aa475f1c944
Author: Colin Walters <walters verbum org>
Date:   Mon Apr 1 21:52:24 2013 -0400

    switchroot: Suppress compiler warning for asprintf
    
    We're not going to run OOM here, if we do, we're totally screwed
    anyways.

 src/switchroot/ostree-switch-root.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/switchroot/ostree-switch-root.c b/src/switchroot/ostree-switch-root.c
index 6e74373..98c6234 100644
--- a/src/switchroot/ostree-switch-root.c
+++ b/src/switchroot/ostree-switch-root.c
@@ -247,8 +247,8 @@ main(int argc, char *argv[])
   if (ostree_target_path[len-1] == '/')
     ostree_target_path[len-1] = '\0';
   fprintf (stderr, "Resolved OSTree target to: %s\n", ostree_target_path);
-  asprintf (&deploy_path, "%s/ostree/deploy/%s/%s", root_mountpoint,
-           ostree_osname, ostree_target_path);
+  (void) asprintf (&deploy_path, "%s/ostree/deploy/%s/%s", root_mountpoint,
+                  ostree_osname, ostree_target_path);
   
   /* Make deploy_path a bind mount, so we can move it later */
   if (mount (deploy_path, deploy_path, NULL, MS_BIND, NULL) < 0)


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