aboutsummaryrefslogtreecommitdiff
path: root/toys/other
diff options
context:
space:
mode:
Diffstat (limited to 'toys/other')
-rw-r--r--toys/other/factor.c5
-rw-r--r--toys/other/modinfo.c2
-rw-r--r--toys/other/pmap.c2
-rw-r--r--toys/other/rfkill.c2
4 files changed, 7 insertions, 4 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);