diff options
| -rw-r--r-- | toys/other/factor.c | 5 | ||||
| -rw-r--r-- | toys/other/modinfo.c | 2 | ||||
| -rw-r--r-- | toys/other/pmap.c | 2 | ||||
| -rw-r--r-- | toys/other/rfkill.c | 2 | ||||
| -rw-r--r-- | toys/posix/cut.c | 2 | 
5 files changed, 8 insertions, 5 deletions
| diff --git a/toys/other/factor.c b/toys/other/factor.c index bf454b44..570270ed 100644 --- a/toys/other/factor.c +++ b/toys/other/factor.c @@ -22,12 +22,15 @@ static void factor(char *s)    long l, ll;    for (;;) { +    char *err = s; +      while(isspace(*s)) s++;      if (!*s) return;      l = strtol(s, &s, 0);      if (*s && !isspace(*s)) { -      error_msg("%s: not integer"); +      error_msg("%s: not integer", err); +        return;      } diff --git a/toys/other/modinfo.c b/toys/other/modinfo.c index f572a991..a7e6b4bc 100644 --- a/toys/other/modinfo.c +++ b/toys/other/modinfo.c @@ -27,7 +27,7 @@ GLOBALS(  static void output_field(char *field, char *value)  { -  if (!TT.field) xprintf("%s:%*c", field, 15 - strlen(field), ' '); +  if (!TT.field) xprintf("%s:%*c", field, 15-(int)strlen(field), ' ');    else if (strcmp(TT.field, field)) return;    xprintf("%s", value);    xputc((toys.optflags & FLAG_0) ? 0 : '\n'); diff --git a/toys/other/pmap.c b/toys/other/pmap.c index ab0b61cd..a93ea3ee 100644 --- a/toys/other/pmap.c +++ b/toys/other/pmap.c @@ -53,7 +53,7 @@ void pmap_main(void)      if ((toys.optflags & (FLAG_q|FLAG_x)) == FLAG_x)        xprintf("Address%*cKbytes     PSS   Dirty    Swap  Mode  Mapping\n", -        (sizeof(long)*2)-4, ' '); +        (int)(sizeof(long)*2)-4, ' ');      // Loop through mappings      for (;;) { diff --git a/toys/other/rfkill.c b/toys/other/rfkill.c index af3efe18..3ba346b1 100644 --- a/toys/other/rfkill.c +++ b/toys/other/rfkill.c @@ -49,7 +49,7 @@ void rfkill_main(void)        {"wimax", RFKILL_TYPE_WIMAX}, {"wwan", RFKILL_TYPE_WWAN},        {"gps", RFKILL_TYPE_GPS}, {"fm", 7}}; // RFKILL_TYPE_FM = 7 -    if (!*++optargs) error_exit("'%s' needs IDENTIFIER"); +    if (!*++optargs) error_exit("'%s' needs IDENTIFIER", optargs[-1]);      for (i = 0; i < ARRAY_LEN(rftypes); i++)        if (!strcmp(rftypes[i].name, *optargs)) break;      if (i == ARRAY_LEN(rftypes)) idx = atolx_range(*optargs, 0, INT_MAX); diff --git a/toys/posix/cut.c b/toys/posix/cut.c index 7f10c5e7..25f25a8d 100644 --- a/toys/posix/cut.c +++ b/toys/posix/cut.c @@ -111,7 +111,7 @@ static void get_data(void)        else {          int fd = open(*argv, O_RDONLY, 0);          if(fd < 0) {//if file not present then continue with other files. -          perror_msg(*argv); +          perror_msg("%s", *argv);            continue;          }          TT.do_cut(fd); | 
