Permalink
Browse files

Fixed make warnings.

  • Loading branch information...
1 parent 615ea32 commit d2cf1dbcc73ed8e55259ee99b70f6bf3196dcdfb @alexchamberlain committed Jul 12, 2012
Showing with 6 additions and 2 deletions.
  1. +2 −2 loopdev.c
  2. +2 −0 loopdev.h
  3. +1 −0 piimg-loopdev.c
  4. +1 −0 piimg-mount.c
View
@@ -12,8 +12,8 @@
#include "loopdev.h"
-static const char * LOOPDEV_PREFIX = "/dev/loop";
-static int LOOPDEV_PREFIX_LEN = strlen("/dev/loop");
+static const char LOOPDEV_PREFIX[] = "/dev/loop";
+static int LOOPDEV_PREFIX_LEN = sizeof(LOOPDEV_PREFIX)/sizeof(LOOPDEV_PREFIX[0])-1;
char * loopdev_find_unused() {
int control_fd = open("/dev/loop-control", O_RDWR);
View
@@ -1,2 +1,4 @@
+#include <stdint.h>
+
char * loopdev_find_unused();
int loopdev_setup_device(const char * file, uint64_t offset, const char * device);
View
@@ -2,6 +2,7 @@
#include <parted/parted.h>
#include "builtin.h"
+#include "loopdev.h"
#include "command.h"
static int cmd_find_unused(int argc, char* argv[]);
View
@@ -7,6 +7,7 @@
#include "builtin.h"
#include "command.h"
+#include "loopdev.h"
#include "partition.h"
#include "fstr.h"

0 comments on commit d2cf1db

Please sign in to comment.