]> sourceware.org Git - lvm2.git/commitdiff
Fix compile warnings in vgcreate liblvm api unit test case.
authorDave Wysochanski <dwysocha@redhat.com>
Tue, 21 Jul 2009 10:41:47 +0000 (10:41 +0000)
committerDave Wysochanski <dwysocha@redhat.com>
Tue, 21 Jul 2009 10:41:47 +0000 (10:41 +0000)
Use const and PRIu64.

Signed-off-by: Thomas Woerner <twoerner@redhat.com>
Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
Author: Thomas Woerner <twoerner@redhat.com>
Committer: Dave Wysochanski <dwysocha@redhat.com>

test/api/vgcreate.c

index c09e7a8704980e53d4606bb5a66e36ef3284ab46..434b01472d0b257cf158f3dc739b271cb7cf955a 100644 (file)
  */
 #include <stdio.h>
 #include <unistd.h>
+#include <inttypes.h>
 #include "lvm.h"
 
 lvm_t handle;
 vg_t *vg;
-char *vg_name = "my_vg";
-char *device = "/dev/loop3";
+const char *vg_name = "my_vg";
+const char *device = "/dev/loop3";
 uint64_t size = 1024;
 
 int main(int argc, char *argv[])
@@ -55,11 +56,11 @@ int main(int argc, char *argv[])
                goto bad;
        }
 
-       printf("Setting VG %s extent_size to %d\n", vg_name, size);
+       printf("Setting VG %s extent_size to %"PRIu64"\n", vg_name, size);
        status = lvm_vg_set_extent_size(vg, size);
        if (!status) {
                fprintf(stderr, "Can not set physical extent "
-                       "size '%ld' for '%s'\n",
+                       "size '%"PRIu64"' for '%s'\n",
                        size, vg_name);
                goto bad;
        }
This page took 0.039189 seconds and 5 git commands to generate.