Преглед изворни кода

Cast field width function arguments to int

Guillem Jover пре 17 година
родитељ
комит
fe29af206b
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 1 1
      lib/dpkg/fields.c
  2. 2 1
      src/main.c

+ 1 - 1
lib/dpkg/fields.c

@@ -53,7 +53,7 @@ convert_string(struct parsedb_state *ps, const char *what, int otherwise,
   if (!nvip->name) {
     if (otherwise != -1) return otherwise;
     parse_error(ps, pigp, _("`%.*s' is not allowed for %s"),
-                strnlen(startp, 50), startp, what);
+                (int)strnlen(startp, 50), startp, what);
   }
 
   ep = startp + nvip->length;

+ 2 - 1
src/main.c

@@ -368,7 +368,8 @@ static void setforce(const struct cmdinfo *cip, const char *value) {
 	  if (fip->opt)
 	    *fip->opt= cip->arg;
       } else
-	badusage(_("unknown force/refuse option `%.*s'"), min(l, 250), value);
+	badusage(_("unknown force/refuse option `%.*s'"),
+	         (int)min(l, 250), value);
     } else {
       if (fip->opt)
 	*fip->opt= cip->arg;