diff options
author | murray <murray@FreeBSD.org> | 2001-09-22 22:34:14 +0000 |
---|---|---|
committer | murray <murray@FreeBSD.org> | 2001-09-22 22:34:14 +0000 |
commit | 8cda2ec97f6a72f452fa861c3adb93522ab009ec (patch) | |
tree | 559aad15701145a1eb59d1f40d1fad851a9bec69 /usr.sbin/sysinstall | |
parent | 25145b8fcd5fdd66168789afd55e4c800f8362bc (diff) | |
download | FreeBSD-src-8cda2ec97f6a72f452fa861c3adb93522ab009ec.zip FreeBSD-src-8cda2ec97f6a72f452fa861c3adb93522ab009ec.tar.gz |
Silence warnings on alpha :
Use '%p' when printing out the address of a function.
sizeof(int) != sizeof(long)
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r-- | usr.sbin/sysinstall/command.c | 15 | ||||
-rw-r--r-- | usr.sbin/sysinstall/config.c | 2 |
2 files changed, 11 insertions, 6 deletions
diff --git a/usr.sbin/sysinstall/command.c b/usr.sbin/sysinstall/command.c index 2242495..65d57ae 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 5c4f818..d12cd91 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); |