summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1998-08-02 15:18:45 +0000
committerbde <bde@FreeBSD.org>1998-08-02 15:18:45 +0000
commitdbc09be291ed507f26f3b2f3fbad6b02ef6bf476 (patch)
tree447936f1245497e41047f88a616f368a498ba092 /usr.bin
parent559a9a5f7d40627eaecd0fc3cd60b6d49c3853b9 (diff)
downloadFreeBSD-src-dbc09be291ed507f26f3b2f3fbad6b02ef6bf476.zip
FreeBSD-src-dbc09be291ed507f26f3b2f3fbad6b02ef6bf476.tar.gz
Fixed printf format errors.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/cap_mkdb/cap_mkdb.c4
-rw-r--r--usr.bin/gencat/genlib.c6
-rw-r--r--usr.bin/mklocale/yacc.y22
-rw-r--r--usr.bin/rpcgen/rpc_sample.c2
-rw-r--r--usr.bin/rpcgen/rpc_svcout.c2
5 files changed, 19 insertions, 17 deletions
diff --git a/usr.bin/cap_mkdb/cap_mkdb.c b/usr.bin/cap_mkdb/cap_mkdb.c
index 1e1c201..91c2222 100644
--- a/usr.bin/cap_mkdb/cap_mkdb.c
+++ b/usr.bin/cap_mkdb/cap_mkdb.c
@@ -102,7 +102,7 @@ main(argc, argv)
*/
(void)snprintf(buf, sizeof(buf), "%s.db", capname ? capname : *argv);
if ((capname = strdup(buf)) == NULL)
- err(1, "");
+ err(1, (char *)NULL);
if ((capdbp = dbopen(capname,
O_CREAT | O_TRUNC | O_RDWR, DEFFILEMODE, DB_HASH, NULL)) == NULL)
err(1, "%s", buf);
@@ -159,7 +159,7 @@ db_build(ifiles)
if (bplen <= len + 2) {
bplen += MAX(256, len + 2);
if ((data.data = realloc(data.data, bplen)) == NULL)
- err(1, "");
+ err(1, (char *)NULL);
}
/* Find the end of the name field. */
diff --git a/usr.bin/gencat/genlib.c b/usr.bin/gencat/genlib.c
index a6321cb..68cc7f4 100644
--- a/usr.bin/gencat/genlib.c
+++ b/usr.bin/gencat/genlib.c
@@ -74,7 +74,7 @@ static void warning(cptr, msg)
char *cptr;
char *msg;
{
- warnx("%s on line %d\n%s", msg, lineno, curline);
+ warnx("%s on line %ld\n%s", msg, lineno, curline);
if (cptr) {
char *tptr;
for (tptr = curline; tptr < cptr; ++tptr) putc(' ', stderr);
@@ -877,7 +877,7 @@ FILE *fp;
errx(1, "no catalog open");
for (set = cat->first; set; set = set->next) {
- fprintf(fp, "$set %d", set->setId);
+ fprintf(fp, "$set %ld", set->setId);
if (set->hconst)
fprintf(fp, " # %s", set->hconst);
fprintf(fp, "\n\n");
@@ -885,7 +885,7 @@ FILE *fp;
for (msg = set->first; msg; msg = msg->next) {
if (msg->hconst)
fprintf(fp, "# %s\n", msg->hconst);
- fprintf(fp, "%d\t%s\n", msg->msgId, msg->str);
+ fprintf(fp, "%ld\t%s\n", msg->msgId, msg->str);
}
fprintf(fp, "\n");
}
diff --git a/usr.bin/mklocale/yacc.y b/usr.bin/mklocale/yacc.y
index a54f25c..a9c2b42 100644
--- a/usr.bin/mklocale/yacc.y
+++ b/usr.bin/mklocale/yacc.y
@@ -687,15 +687,15 @@ dump_tables()
if (new_locale.encoding[0])
fprintf(stderr, "ENCODING %s\n", new_locale.encoding);
if (new_locale.variable)
- fprintf(stderr, "VARIABLE %s\n", new_locale.variable);
+ fprintf(stderr, "VARIABLE %s\n", (char *)new_locale.variable);
fprintf(stderr, "\nMAPLOWER:\n\n");
for (x = 0; x < _CACHED_RUNES; ++x) {
if (isprint(maplower.map[x]))
- fprintf(stderr, " '%c'", maplower.map[x]);
+ fprintf(stderr, " '%c'", (int)maplower.map[x]);
else if (maplower.map[x])
- fprintf(stderr, "%04x", maplower.map[x]);
+ fprintf(stderr, "%04lx", maplower.map[x]);
else
fprintf(stderr, "%4x", 0);
if ((x & 0xf) == 0xf)
@@ -712,9 +712,9 @@ dump_tables()
for (x = 0; x < _CACHED_RUNES; ++x) {
if (isprint(mapupper.map[x]))
- fprintf(stderr, " '%c'", mapupper.map[x]);
+ fprintf(stderr, " '%c'", (int)mapupper.map[x]);
else if (mapupper.map[x])
- fprintf(stderr, "%04x", mapupper.map[x]);
+ fprintf(stderr, "%04lx", mapupper.map[x]);
else
fprintf(stderr, "%4x", 0);
if ((x & 0xf) == 0xf)
@@ -735,9 +735,9 @@ dump_tables()
if (r) {
if (isprint(x))
- fprintf(stderr, " '%c': %2d", x, r & 0xff);
+ fprintf(stderr, " '%c': %2d", x, (int)(r & 0xff));
else
- fprintf(stderr, "%04x: %2d", x, r & 0xff);
+ fprintf(stderr, "%04x: %2d", x, (int)(r & 0xff));
fprintf(stderr, " %4s", (r & _A) ? "alph" : "");
fprintf(stderr, " %4s", (r & _C) ? "ctrl" : "");
@@ -761,7 +761,8 @@ dump_tables()
if (list->map && list->min + 3 < list->max) {
unsigned long r = list->map;
- fprintf(stderr, "%04x: %2d", list->min, r & 0xff);
+ fprintf(stderr, "%04lx: %2d",
+ (unsigned long)list->min, (int)(r & 0xff));
fprintf(stderr, " %4s", (r & _A) ? "alph" : "");
fprintf(stderr, " %4s", (r & _C) ? "ctrl" : "");
@@ -779,7 +780,8 @@ dump_tables()
fprintf(stderr, " %4s", (r & _Q) ? "phon" : "");
fprintf(stderr, "\n...\n");
- fprintf(stderr, "%04x: %2d", list->max, r & 0xff);
+ fprintf(stderr, "%04lx: %2d",
+ (unsigned long)list->max, (int)(r & 0xff));
fprintf(stderr, " %4s", (r & _A) ? "alph" : "");
fprintf(stderr, " %4s", (r & _C) ? "ctrl" : "");
@@ -801,7 +803,7 @@ dump_tables()
unsigned long r = ntohl(list->types[x - list->min]);
if (r) {
- fprintf(stderr, "%04x: %2d", x, r & 0xff);
+ fprintf(stderr, "%04x: %2d", x, (int)(r & 0xff));
fprintf(stderr, " %4s", (r & _A) ? "alph" : "");
fprintf(stderr, " %4s", (r & _C) ? "ctrl" : "");
diff --git a/usr.bin/rpcgen/rpc_sample.c b/usr.bin/rpcgen/rpc_sample.c
index 1de374c..e4f045f 100644
--- a/usr.bin/rpcgen/rpc_sample.c
+++ b/usr.bin/rpcgen/rpc_sample.c
@@ -221,7 +221,7 @@ write_sample_server(def)
else
f_print(fout, "char *");
/* cannot have void type */
- f_print(fout, " result;\n", proc->res_type);
+ f_print(fout, " result;\n");
}
else
f_print(fout, "\tbool_t retval;\n");
diff --git a/usr.bin/rpcgen/rpc_svcout.c b/usr.bin/rpcgen/rpc_svcout.c
index cb26f22..62b2ab1 100644
--- a/usr.bin/rpcgen/rpc_svcout.c
+++ b/usr.bin/rpcgen/rpc_svcout.c
@@ -196,7 +196,7 @@ write_netid_register(transp)
f_print(fout, "%s\t\texit(1);\n", sp);
f_print(fout, "%s\t}\n", sp);
f_print(fout, "%s\t%s = svc_tli_create(RPC_ANYFD, nconf, 0, 0, 0);\n",
- sp, TRANSP, transp);
+ sp, TRANSP);
f_print(fout, "%s\tif (%s == NULL) {\n", sp, TRANSP);
(void) sprintf(_errbuf, "cannot create %s service.", transp);
print_err_message(tmpbuf);
OpenPOWER on IntegriCloud