diff options
39 files changed, 79 insertions, 67 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c index 90164ebff5a8..a8ec2d92dfd7 100644 --- a/bin/chmod/chmod.c +++ b/bin/chmod/chmod.c @@ -193,7 +193,7 @@ done: argv += optind; } if (chmod(p->fts_accpath, oct ? omode : getmode(set, p->fts_statp->st_mode)) && !fflag) { - warn(p->fts_path); + warn("%s", p->fts_path); rval = 1; } else { if (vflag) diff --git a/contrib/opie/opieftpd.c b/contrib/opie/opieftpd.c index b6e764d85b94..1bace12bd03b 100644 --- a/contrib/opie/opieftpd.c +++ b/contrib/opie/opieftpd.c @@ -633,7 +633,7 @@ VOIDRET pass FUNCTION((passwd), char *passwd) #if DOTITLE snprintf(proctitle, sizeof(proctitle), "%s: anonymous/%s", remotehost, passwd); - setproctitle(proctitle); + setproctitle("%s", proctitle); #endif /* DOTITLE */ syslog(LOG_NOTICE, "ANONYMOUS FTP login from %s with ID %s", remotehost, passwd); @@ -644,7 +644,7 @@ VOIDRET pass FUNCTION((passwd), char *passwd) #if DOTITLE snprintf(proctitle, sizeof(proctitle), "%s: %s", remotehost, pw->pw_name); - setproctitle(proctitle); + setproctitle("%s", proctitle); #endif /* DOTITLE */ syslog(LOG_INFO, "FTP login from %s with user name %s", remotehost, pw->pw_name); } @@ -1262,7 +1262,7 @@ static VOIDRET dolog FUNCTION((sin), struct sockaddr_in *sin) remotehost[sizeof(remotehost) - 1] = '\0'; #if DOTITLE snprintf(proctitle, sizeof(proctitle), "%s: connected", remotehost); - setproctitle(proctitle); + setproctitle("%s", proctitle); #endif /* DOTITLE */ t = time((time_t *) 0); diff --git a/crypto/telnet/libtelnet/read_password.c b/crypto/telnet/libtelnet/read_password.c index 4676ed3a01bb..f97729088068 100644 --- a/crypto/telnet/libtelnet/read_password.c +++ b/crypto/telnet/libtelnet/read_password.c @@ -32,7 +32,11 @@ */ #ifndef lint +#if 0 static char sccsid[] = "@(#)read_password.c 8.3 (Berkeley) 5/30/95"; +#endif +static const char rcsid[] = + "$FreeBSD$"; #endif /* not lint */ /* @@ -101,7 +105,7 @@ local_des_read_pw_string(s,max,prompt,verify) if (ioctl(0,TIOCSETP,(char *)&tty_state) == -1) return -1; while (!ok) { - (void) printf(prompt); + (void) printf("%s", prompt); (void) fflush(stdout); while (!fgets(s, max, stdin)); diff --git a/games/hack/hack.tty.c b/games/hack/hack.tty.c index df49cfc3dadd..f86c09fe8206 100644 --- a/games/hack/hack.tty.c +++ b/games/hack/hack.tty.c @@ -135,7 +135,7 @@ gettty(){ settty(s) char *s; { clear_screen(); end_screen(); - if(s) printf(s); + if(s) printf("%s", s); (void) fflush(stdout); if(STTY(&inittyb) < 0) perror("Hack (settty)"); diff --git a/games/rogue/message.c b/games/rogue/message.c index d9e2456512dd..3758a54d2f95 100644 --- a/games/rogue/message.c +++ b/games/rogue/message.c @@ -205,7 +205,7 @@ rgetchar() break; #ifdef UNIX_BSD4_2 case '\032': - printf(CL); + printf("%s", CL); fflush(stdout); tstp(); break; diff --git a/games/trek/phaser.c b/games/trek/phaser.c index a4ed5354c137..5fa25c0c3477 100644 --- a/games/trek/phaser.c +++ b/games/trek/phaser.c @@ -126,13 +126,13 @@ phaser() { if (damaged(COMPUTER)) { - printf(Device[COMPUTER].name); + printf("%s", Device[COMPUTER].name); manual++; } else if (damaged(SRSCAN)) { - printf(Device[SRSCAN].name); + printf("%s", Device[SRSCAN].name); manual++; } if (manual) diff --git a/gnu/usr.bin/tar/port.c b/gnu/usr.bin/tar/port.c index 60b0f0f42932..23c197acfc46 100644 --- a/gnu/usr.bin/tar/port.c +++ b/gnu/usr.bin/tar/port.c @@ -17,6 +17,8 @@ You should have received a copy of the GNU General Public License along with GNU Tar; see the file COPYING. If not, write to the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ +/* $FreeBSD$ */ + #include <stdio.h> #include <sys/types.h> #include <signal.h> @@ -629,7 +631,7 @@ panic (s) { if (myname) fprintf (stderr, "%s:", myname); - fprintf (stderr, s); + fprintf (stderr, "%s", s); putc ('\n', stderr); exit (12); } diff --git a/lib/libdisk/tst01.c b/lib/libdisk/tst01.c index cd49b72a080e..faa6005a2480 100644 --- a/lib/libdisk/tst01.c +++ b/lib/libdisk/tst01.c @@ -153,7 +153,7 @@ main(int argc, char **argv) free(q); q = p = readline(myprompt); #else - printf(myprompt); + printf("%s", myprompt); fflush(stdout); q = p = fgets(input,sizeof(input),stdin); #endif diff --git a/libexec/revnetgroup/revnetgroup.c b/libexec/revnetgroup/revnetgroup.c index eccdada23c58..347c517fcfb3 100644 --- a/libexec/revnetgroup/revnetgroup.c +++ b/libexec/revnetgroup/revnetgroup.c @@ -114,7 +114,7 @@ main(argc, argv) if (strcmp(netgroup, "-")) { if ((fp = fopen(netgroup, "r")) == NULL) { - err(1,netgroup); + err(1, "%s", netgroup); } } else { fp = stdin; diff --git a/sbin/ipfw/ipfw.c b/sbin/ipfw/ipfw.c index 50a57ef3987c..12f25c602aad 100644 --- a/sbin/ipfw/ipfw.c +++ b/sbin/ipfw/ipfw.c @@ -635,7 +635,7 @@ list(ac, av) if (rulenum != 0 && rulenum != p->pipe_nr) continue; if (p->if_name[0] != '\0') - sprintf(buf, p->if_name); + sprintf(buf, "%s", p->if_name); else if (b == 0) sprintf(buf, "unlimited"); else if (b >= 1000000) diff --git a/sbin/mount_msdos/mount_msdos.c b/sbin/mount_msdos/mount_msdos.c index d2bcb2632e8b..8265826239fb 100644 --- a/sbin/mount_msdos/mount_msdos.c +++ b/sbin/mount_msdos/mount_msdos.c @@ -331,7 +331,7 @@ load_ultable (pargs, name) int i; if (setlocale(LC_CTYPE, name) == NULL) - err(EX_CONFIG, name); + err(EX_CONFIG, "%s", name); for (i = 0; i < 128; i++) { pargs->ul[i] = tolower(i | 0x80); pargs->lu[i] = toupper(i | 0x80); diff --git a/sys/alpha/alpha/machdep.c b/sys/alpha/alpha/machdep.c index 385dc4034364..a7f0a52e9c5e 100644 --- a/sys/alpha/alpha/machdep.c +++ b/sys/alpha/alpha/machdep.c @@ -269,7 +269,7 @@ cpu_startup(dummy) /* * Good {morning,afternoon,evening,night}. */ - printf(version); + printf("%s", version); identifycpu(); /* startrtclock(); */ diff --git a/sys/boot/common/commands.c b/sys/boot/common/commands.c index 0aab78e51bd4..b0fb412a9ea3 100644 --- a/sys/boot/common/commands.c +++ b/sys/boot/common/commands.c @@ -326,7 +326,7 @@ command_echo(int argc, char *argv[]) s = unargv(argc, argv); if (s != NULL) { - printf(s); + printf("%s", s); free(s); } if (!nl) @@ -378,7 +378,7 @@ command_read(int argc, char *argv[]) name = (argc > 0) ? argv[0]: NULL; if (prompt != NULL) - printf(prompt); + printf("%s", prompt); if (timeout >= 0) { when = time(NULL) + timeout; while (!ischar()) diff --git a/sys/boot/common/interp.c b/sys/boot/common/interp.c index 880910bae094..ab0cf258fe95 100644 --- a/sys/boot/common/interp.c +++ b/sys/boot/common/interp.c @@ -329,7 +329,7 @@ prompt(void) ev = getenv(p + 2); if (ev != NULL) - printf(ev); + printf("%s", ev); p = cp + 1; continue; } diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index c06cf5a8b474..5edd0947bbcc 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -265,7 +265,7 @@ cpu_startup(dummy) /* * Good {morning,afternoon,evening,night}. */ - printf(version); + printf("%s", version); earlysetcpuclass(); startrtclock(); printcpuinfo(); diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c index db1866b79734..29d1f3968851 100644 --- a/sys/pc98/i386/machdep.c +++ b/sys/pc98/i386/machdep.c @@ -278,7 +278,7 @@ cpu_startup(dummy) /* * Good {morning,afternoon,evening,night}. */ - printf(version); + printf("%s", version); earlysetcpuclass(); startrtclock(); printcpuinfo(); diff --git a/usr.bin/biff/biff.c b/usr.bin/biff/biff.c index 606afa8a919d..718263f5cab6 100644 --- a/usr.bin/biff/biff.c +++ b/usr.bin/biff/biff.c @@ -87,11 +87,11 @@ main(argc, argv) switch(argv[0][0]) { case 'n': if (chmod(name, sb.st_mode & ~0100) < 0) - err(2, name); + err(2, "%s", name); break; case 'y': if (chmod(name, sb.st_mode | 0100) < 0) - err(2, name); + err(2, "%s", name); break; default: usage(); diff --git a/usr.bin/colcrt/colcrt.c b/usr.bin/colcrt/colcrt.c index c165177bf4ed..67f4b06dfdfd 100644 --- a/usr.bin/colcrt/colcrt.c +++ b/usr.bin/colcrt/colcrt.c @@ -38,7 +38,11 @@ static const char copyright[] = #endif /* not lint */ #ifndef lint +#if 0 static const char sccsid[] = "@(#)colcrt.c 8.1 (Berkeley) 6/6/93"; +#endif +static const char rcsid[] = + "$FreeBSD$"; #endif /* not lint */ #include <err.h> @@ -104,7 +108,7 @@ main(argc, argv) close(0); if (!(f = fopen(argv[0], "r"))) { fflush(stdout); - err(1, argv[0]); + err(1, "%s", argv[0]); } argc--; argv++; diff --git a/usr.bin/ee/ee.c b/usr.bin/ee/ee.c index 4f2da7d39de4..94be3d73df83 100644 --- a/usr.bin/ee/ee.c +++ b/usr.bin/ee/ee.c @@ -3096,7 +3096,7 @@ char *string; /* string containing user command */ } if (shell_fork) { - printf(continue_msg); + printf("%s", continue_msg); fflush(stdout); while ((in = getchar()) != '\n') ; diff --git a/usr.bin/finger/util.c b/usr.bin/finger/util.c index 54c68f0f6f98..dbf5e5f6fe9f 100644 --- a/usr.bin/finger/util.c +++ b/usr.bin/finger/util.c @@ -326,7 +326,7 @@ find_idle_and_ttywrite(w) (void)snprintf(tbuf, sizeof(tbuf), "%s/%s", _PATH_DEV, w->tty); if (stat(tbuf, &sb) < 0) { - warn(tbuf); + warn("%s", tbuf); return; } w->idletime = now < sb.st_atime ? 0 : now - sb.st_atime; diff --git a/usr.bin/hexdump/display.c b/usr.bin/hexdump/display.c index 2d3bdcbd964a..982e6116302b 100644 --- a/usr.bin/hexdump/display.c +++ b/usr.bin/hexdump/display.c @@ -106,7 +106,7 @@ display() (void)printf(pr->fmt, (quad_t)eaddress); break; case F_TEXT: - (void)printf(pr->fmt); + (void)printf("%s", pr->fmt); break; } } @@ -177,7 +177,7 @@ print(pr, bp) (void)printf(pr->fmt, (char *)bp); break; case F_TEXT: - (void)printf(pr->fmt); + (void)printf("%s", pr->fmt); break; case F_U: conv_u(pr, bp); diff --git a/usr.bin/indent/indent.c b/usr.bin/indent/indent.c index 02d34445ee75..08977bdd23cc 100644 --- a/usr.bin/indent/indent.c +++ b/usr.bin/indent/indent.c @@ -189,7 +189,7 @@ main(argc, argv) in_name = argv[i]; /* remember name of input file */ input = fopen(in_name, "r"); if (input == 0) /* check for open error */ - err(1, in_name); + err(1, "%s", in_name); continue; } else if (output == 0) { /* we have the output file */ @@ -200,7 +200,7 @@ main(argc, argv) } output = fopen(out_name, "w"); if (output == 0) /* check for create error */ - err(1, out_name); + err(1, "%s", out_name); continue; } errx(1, "unknown parameter: %s", argv[i]); @@ -1160,23 +1160,23 @@ bakcopy() /* copy in_name to backup file */ bakchn = creat(bakfile, 0600); if (bakchn < 0) - err(1, bakfile); + err(1, "%s", bakfile); while (n = read(fileno(input), buff, sizeof buff)) if (write(bakchn, buff, n) != n) - err(1, bakfile); + err(1, "%s", bakfile); if (n < 0) - err(1, in_name); + err(1, "%s", in_name); close(bakchn); fclose(input); /* re-open backup file as the input file */ input = fopen(bakfile, "r"); if (input == 0) - err(1, bakfile); + err(1, "%s", bakfile); /* now the original input file will be the output */ output = fopen(in_name, "w"); if (output == 0) { unlink(bakfile); - err(1, in_name); + err(1, "%s", in_name); } } diff --git a/usr.bin/jot/jot.c b/usr.bin/jot/jot.c index a15b83f9937e..e415aba3d5c9 100644 --- a/usr.bin/jot/jot.c +++ b/usr.bin/jot/jot.c @@ -315,7 +315,7 @@ putdata(x, notlast) { if (boring) - printf(format); + printf("%s", format); else if (longdata && nosign) { if (x <= (double)ULONG_MAX && x >= (double)0) printf(format, (unsigned long)x); diff --git a/usr.bin/ktrace/ktrace.c b/usr.bin/ktrace/ktrace.c index 1c5a98ba6796..48d4871a210b 100644 --- a/usr.bin/ktrace/ktrace.c +++ b/usr.bin/ktrace/ktrace.c @@ -136,14 +136,14 @@ main(argc, argv) ops |= pid ? KTROP_CLEAR : KTROP_CLEARFILE; if (ktrace(tracefile, ops, trpoints, pid) < 0) - err(1, tracefile); + err(1, "%s", tracefile); exit(0); } omask = umask(S_IRWXG|S_IRWXO); if (append) { if ((fd = open(tracefile, O_CREAT | O_WRONLY, DEFFILEMODE)) < 0) - err(1, tracefile); + err(1, "%s", tracefile); if (fstat(fd, &sb) != 0 || sb.st_uid != getuid()) errx(1, "Refuse to append to %s not owned by you.", tracefile); @@ -152,19 +152,19 @@ main(argc, argv) err(1, "unlink %s", tracefile); if ((fd = open(tracefile, O_CREAT | O_EXCL | O_WRONLY, DEFFILEMODE)) < 0) - err(1, tracefile); + err(1, "%s", tracefile); } (void)umask(omask); (void)close(fd); if (*argv) { if (ktrace(tracefile, ops, trpoints, getpid()) < 0) - err(1, tracefile); + err(1, "%s", tracefile); execvp(argv[0], &argv[0]); err(1, "exec of '%s' failed", argv[0]); } else if (ktrace(tracefile, ops, trpoints, pid) < 0) - err(1, tracefile); + err(1, "%s", tracefile); exit(0); } diff --git a/usr.bin/kzip/kzip.c b/usr.bin/kzip/kzip.c index 97e1a4db356d..5af945a991ca 100644 --- a/usr.bin/kzip/kzip.c +++ b/usr.bin/kzip/kzip.c @@ -85,13 +85,13 @@ main(int argc, char **argv) fdi = open(kernname ,O_RDONLY); if(fdi<0) { - warn(kernname); + warn("%s", kernname); return 2; } /* figure out how big the uncompressed image will be */ if (read (fdi, (char *)&hdr, sizeof(hdr)) != sizeof(hdr)) - err(2, argv[1]); + err(2, "%s", argv[1]); size = hdr.a_text + hdr.a_data + hdr.a_bss; entry = hdr.a_entry & 0x00FFFFFF; @@ -106,7 +106,7 @@ main(int argc, char **argv) fdo = open(obj,O_WRONLY|O_TRUNC|O_CREAT,0666); if(fdo<0) { - warn(obj); + warn("%s", obj); return 2; } @@ -222,13 +222,13 @@ main(int argc, char **argv) fdn = open(obj ,O_RDONLY); if(fdn<0) { - warn(obj); + warn("%s", obj); return 3; } /* figure out how big the compressed image is */ if (read (fdn, (char *)&hdr, sizeof(hdr)) != sizeof(hdr)) { - warn(obj); + warn("%s", obj); return 3; } close(fdn); @@ -251,11 +251,11 @@ extract (char *file) struct exec hdr; if (read (0, (char *)&hdr, sizeof(hdr)) != sizeof(hdr)) - err(2, file); + err(2, "%s", file); if (hdr.a_magic != ZMAGIC) errx(2, "bad magic in file %s, probably not a kernel", file); if (lseek (0, N_TXTOFF(hdr), 0) < 0) - err(2, file); + err(2, "%s", file); sz = N_SYMOFF (hdr) - N_TXTOFF (hdr); @@ -269,7 +269,7 @@ extract (char *file) n = read (0, buf, l); if (n != l) { if (n == -1) - err(1, file); + err(1, "%s", file); else errx(1, "unexpected EOF"); } diff --git a/usr.bin/lam/lam.c b/usr.bin/lam/lam.c index 277081095af7..e65df368ce8d 100644 --- a/usr.bin/lam/lam.c +++ b/usr.bin/lam/lam.c @@ -118,7 +118,7 @@ getargs(av) if (*p == '-') ip->fp = stdin; else if ((ip->fp = fopen(p, "r")) == NULL) { - err(1, p); + err(1, "%s", p); } ip->pad = P; if (!ip->sepstring) diff --git a/usr.bin/last/last.c b/usr.bin/last/last.c index 6ad6f3b2004d..5efd9e829ca5 100644 --- a/usr.bin/last/last.c +++ b/usr.bin/last/last.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef lint @@ -321,7 +323,7 @@ wtmp() } tm = localtime(&buf[0].ut_time); (void) strftime(ct, sizeof(ct), "\nwtmp begins %c\n", tm); - printf(ct); + printf("%s", ct); } /* diff --git a/usr.bin/script/script.c b/usr.bin/script/script.c index 708a59b68e61..e4663f9b4c29 100644 --- a/usr.bin/script/script.c +++ b/usr.bin/script/script.c @@ -244,10 +244,10 @@ doshell(av) login_tty(slave); if (av[0]) { execvp(av[0], av); - warn(av[0]); + warn("%s", av[0]); } else { execl(shell, shell, "-i", NULL); - warn(shell); + warn("%s", shell); } fail(); } diff --git a/usr.bin/soelim/soelim.c b/usr.bin/soelim/soelim.c index 9152a2791b44..c6fc2a2dcc89 100644 --- a/usr.bin/soelim/soelim.c +++ b/usr.bin/soelim/soelim.c @@ -102,7 +102,7 @@ process(file) } else { soee = fopen(file, "r"); if (soee == NULL) { - warn(file); + warn("%s", file); return(-1); } } diff --git a/usr.sbin/IPXrouted/trace.c b/usr.sbin/IPXrouted/trace.c index 63fb1e9bd5dc..b89d9f877afb 100644 --- a/usr.sbin/IPXrouted/trace.c +++ b/usr.sbin/IPXrouted/trace.c @@ -279,7 +279,7 @@ traceactionlog(action, rt) first = 0; } } - syslog(LOG_DEBUG, lstr); + syslog(LOG_DEBUG, "%s", lstr); free(lstr); } diff --git a/usr.sbin/elf2exe/elf2exe.c b/usr.sbin/elf2exe/elf2exe.c index 41c7e87527e5..d0959eb1400c 100644 --- a/usr.sbin/elf2exe/elf2exe.c +++ b/usr.sbin/elf2exe/elf2exe.c @@ -102,7 +102,7 @@ open_elffile(char *filename) int fileno = open(filename, O_RDONLY); if (fileno < 0) - err(1, filename); + err(1, "%s", filename); return (fileno); } @@ -183,7 +183,7 @@ open_exefile(char *filename) int fileno = open(filename, O_RDWR | O_TRUNC | O_CREAT, 0666); if (fileno < 0) - err(1, filename); + err(1, "%s", filename); return (fileno); } diff --git a/usr.sbin/kgzip/kgzcmp.c b/usr.sbin/kgzip/kgzcmp.c index 489e845a0a0e..a10c1678b90e 100644 --- a/usr.sbin/kgzip/kgzcmp.c +++ b/usr.sbin/kgzip/kgzcmp.c @@ -142,7 +142,7 @@ mk_data(const struct iodesc * idi, const struct iodesc * ido, if (e) errx(1, "%s: Invalid format", idi->fname); if (fstat(ido->fd, &sb)) - err(1, ido->fname); + err(1, "%s", ido->fname); kh->nsize = sb.st_size - KGZOFF; } diff --git a/usr.sbin/rpc.lockd/procs.c b/usr.sbin/rpc.lockd/procs.c index 07060fd16a97..56270022c3d0 100644 --- a/usr.sbin/rpc.lockd/procs.c +++ b/usr.sbin/rpc.lockd/procs.c @@ -165,7 +165,7 @@ static CLIENT *get_client(struct sockaddr_in *host_addr) client = clntudp_create(host_addr, NLM_PROG, NLM_VERS, retry_time, &sock_no); if (!client) { - syslog(LOG_ERR, clnt_spcreateerror("clntudp_create")); + syslog(LOG_ERR, "%s", clnt_spcreateerror("clntudp_create")); syslog(LOG_ERR, "Unable to return result to %s", inet_ntoa(host_addr->sin_addr)); return NULL; diff --git a/usr.sbin/rpc.ypupdated/ypupdated_main.c b/usr.sbin/rpc.ypupdated/ypupdated_main.c index 116f77df33f4..4d3f1260b3a9 100644 --- a/usr.sbin/rpc.ypupdated/ypupdated_main.c +++ b/usr.sbin/rpc.ypupdated/ypupdated_main.c @@ -84,11 +84,11 @@ void _msgout(char* msg) { #ifdef RPC_SVC_FG if (_rpcpmstart) - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); else warnx("%s", msg); #else - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); #endif } diff --git a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c index 5cb6b42e775e..50a5793ac8ba 100644 --- a/usr.sbin/rpc.ypxfrd/ypxfrd_main.c +++ b/usr.sbin/rpc.ypxfrd/ypxfrd_main.c @@ -84,11 +84,11 @@ void _msgout(char* msg) { #ifdef RPC_SVC_FG if (_rpcpmstart) - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); else warnx("%s", msg); #else - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); #endif } diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 004f1635dd6f..138d3c4a624e 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -513,7 +513,7 @@ void quit(msg) char *msg; { - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); exit(1); } diff --git a/usr.sbin/vipw/pw_util.c b/usr.sbin/vipw/pw_util.c index 207da8f0d5bf..fe99d7171b34 100644 --- a/usr.sbin/vipw/pw_util.c +++ b/usr.sbin/vipw/pw_util.c @@ -250,7 +250,7 @@ pw_error(name, err, eval) extern int _use_yp; #endif /* YP */ if (err) - warn(name); + warn("%s", name); #ifdef YP if (_use_yp) warnx("NIS information unchanged"); diff --git a/usr.sbin/vnconfig/vnconfig.c b/usr.sbin/vnconfig/vnconfig.c index 779772038490..ad7e39ec60c6 100644 --- a/usr.sbin/vnconfig/vnconfig.c +++ b/usr.sbin/vnconfig/vnconfig.c @@ -317,7 +317,7 @@ config(vnp) rdev = rawdevice(dev); f = fopen(rdev, "rw"); if (f == NULL) { - warn(dev); + warn("%s", dev); return(1); } vnio.vn_file = file; diff --git a/usr.sbin/ypserv/yp_main.c b/usr.sbin/ypserv/yp_main.c index 837b51542f77..07b20890cd01 100644 --- a/usr.sbin/ypserv/yp_main.c +++ b/usr.sbin/ypserv/yp_main.c @@ -91,11 +91,11 @@ void _msgout(char* msg) { if (debug) { if (_rpcpmstart) - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); else warnx("%s", msg); } else - syslog(LOG_ERR, msg); + syslog(LOG_ERR, "%s", msg); } pid_t yp_pid; |
