From d47aa91c6afc513c2b7ccefa0e999eb38a9e02f4 Mon Sep 17 00:00:00 2001 From: Murray Stokely Date: Sat, 22 Sep 2001 22:34:14 +0000 Subject: Silence warnings on alpha : Use '%p' when printing out the address of a function. sizeof(int) != sizeof(long) --- usr.sbin/sysinstall/command.c | 15 ++++++++++----- usr.sbin/sysinstall/config.c | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'usr.sbin/sysinstall') diff --git a/usr.sbin/sysinstall/command.c b/usr.sbin/sysinstall/command.c index 2242495f6818..65d57ae75321 100644 --- a/usr.sbin/sysinstall/command.c +++ b/usr.sbin/sysinstall/command.c @@ -160,19 +160,24 @@ command_execute(void) for (j = 0; j < commandStack[i]->ncmds; j++) { /* If it's a shell command, run system on it */ if (commandStack[i]->cmds[j].type == CMD_SHELL) { - msgNotify("Doing %s", commandStack[i]->cmds[j].ptr); + msgNotify("Doing %s", (char *)commandStack[i]->cmds[j].ptr); ret = vsystem("%s", (char *)commandStack[i]->cmds[j].ptr); if (isDebug()) - msgDebug("Command `%s' returns status %d\n", commandStack[i]->cmds[j].ptr, ret); + msgDebug("Command `%s' returns status %d\n", + (char *)commandStack[i]->cmds[j].ptr, ret); } else { - /* It's a function pointer - call it with the key and the data */ + /* It's a function pointer - call it with the key and + the data */ func = (commandFunc)commandStack[i]->cmds[j].ptr; if (isDebug()) - msgDebug("%x: Execute(%s, %s)", func, commandStack[i]->key, commandStack[i]->cmds[j].data); + msgDebug("%p: Execute(%s, %s)", + func, commandStack[i]->key, + (char *)commandStack[i]->cmds[j].data); ret = (*func)(commandStack[i]->key, commandStack[i]->cmds[j].data); if (isDebug()) - msgDebug("Function @ %x returns status %d\n", commandStack[i]->cmds[j].ptr, ret); + msgDebug("Function @ %p returns status %d\n", + commandStack[i]->cmds[j].ptr, ret); } } } diff --git a/usr.sbin/sysinstall/config.c b/usr.sbin/sysinstall/config.c index 5c4f8183fc71..d12cd91efa40 100644 --- a/usr.sbin/sysinstall/config.c +++ b/usr.sbin/sysinstall/config.c @@ -353,7 +353,7 @@ configEnvironmentResolv(char *config) if (nlines == -1) return; for (i = 0; i < nlines; i++) { - Boolean name_set = (Boolean)variable_get(VAR_NAMESERVER); + Boolean name_set = variable_get(VAR_NAMESERVER) ? 1 : 0; if (!strncmp(lines[i], "domain", 6) && !variable_get(VAR_DOMAINNAME)) variable_set2(VAR_DOMAINNAME, string_skipwhite(string_prune(lines[i] + 6)), 0); -- cgit v1.2.3