chiark / gitweb /
Fix two compiler warnings
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 Sep 2013 21:31:10 +0000 (17:31 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 9 Sep 2013 21:35:52 +0000 (17:35 -0400)
src/run/run.c
src/shared/path-util.c

index da8c788eea1fee8bfd894347a47880f929c8dad8..18a4920f0371fd91bb5d1c0e3e775241554e73f6 100644 (file)
@@ -28,6 +28,7 @@
 #include "strv.h"
 #include "build.h"
 #include "unit-name.h"
+#include "path-util.h"
 
 static bool arg_scope = false;
 static bool arg_user = false;
index 8e108db53173f1c39ef1ae2965c7081031ee6fce..45099eeda8d6dc3898467bd31a5b8a087bcdb901 100644 (file)
@@ -456,7 +456,7 @@ int find_binary(const char *name, char **filename) {
                 FOREACH_WORD_SEPARATOR(w, l, path, ":", state) {
                         char *p;
 
-                        if (asprintf(&p, "%.*s/%s", l, w, name) < 0)
+                        if (asprintf(&p, "%.*s/%s", (int) l, w, name) < 0)
                                 return -ENOMEM;
 
                         if (access(p, X_OK) < 0) {