fix non-literal strings where they are not needed.
This commit is contained in:
parent
464d645aeb
commit
dbb4627dd8
14
external/bsd/file/dist/src/fsmagic.c
vendored
14
external/bsd/file/dist/src/fsmagic.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: fsmagic.c,v 1.3 2011/05/13 01:52:13 christos Exp $ */
|
||||
/* $NetBSD: fsmagic.c,v 1.4 2011/08/14 09:06:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) Ian F. Darwin 1986-1995.
|
||||
@ -37,7 +37,7 @@
|
||||
#if 0
|
||||
FILE_RCSID("@(#)$File: fsmagic.c,v 1.62 2010/09/20 20:16:08 rrt Exp $")
|
||||
#else
|
||||
__RCSID("$NetBSD: fsmagic.c,v 1.3 2011/05/13 01:52:13 christos Exp $");
|
||||
__RCSID("$NetBSD: fsmagic.c,v 1.4 2011/08/14 09:06:12 christos Exp $");
|
||||
#endif
|
||||
#endif /* lint */
|
||||
|
||||
@ -69,22 +69,18 @@ __RCSID("$NetBSD: fsmagic.c,v 1.3 2011/05/13 01:52:13 christos Exp $");
|
||||
private int
|
||||
bad_link(struct magic_set *ms, int err, char *buf)
|
||||
{
|
||||
const char *errfmt;
|
||||
int mime = ms->flags & MAGIC_MIME;
|
||||
if ((mime & MAGIC_MIME_TYPE) &&
|
||||
file_printf(ms, "application/x-symlink")
|
||||
== -1)
|
||||
return -1;
|
||||
else if (!mime) {
|
||||
if (err == ELOOP)
|
||||
errfmt = "symbolic link in a loop";
|
||||
else
|
||||
errfmt = "broken symbolic link to `%s'";
|
||||
if (ms->flags & MAGIC_ERROR) {
|
||||
file_error(ms, err, errfmt, buf);
|
||||
file_error(ms, err,
|
||||
"broken symbolic link to `%s'", buf);
|
||||
return -1;
|
||||
}
|
||||
if (file_printf(ms, errfmt, buf) == -1)
|
||||
if (file_printf(ms, "broken symbolic link to `%s'", buf) == -1)
|
||||
return -1;
|
||||
}
|
||||
return 1;
|
||||
|
6
external/bsd/file/dist/src/print.c
vendored
6
external/bsd/file/dist/src/print.c
vendored
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: print.c,v 1.1.1.2 2011/05/12 20:46:53 christos Exp $ */
|
||||
/* $NetBSD: print.c,v 1.2 2011/08/14 09:06:12 christos Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) Ian F. Darwin 1986-1995.
|
||||
@ -37,7 +37,7 @@
|
||||
#if 0
|
||||
FILE_RCSID("@(#)$File: print.c,v 1.69 2010/07/21 16:47:18 christos Exp $")
|
||||
#else
|
||||
__RCSID("$NetBSD: print.c,v 1.1.1.2 2011/05/12 20:46:53 christos Exp $");
|
||||
__RCSID("$NetBSD: print.c,v 1.2 2011/08/14 09:06:12 christos Exp $");
|
||||
#endif
|
||||
#endif /* lint */
|
||||
|
||||
@ -58,7 +58,7 @@ file_mdump(struct magic *m)
|
||||
private const char optyp[] = { FILE_OPS };
|
||||
|
||||
(void) fprintf(stderr, "[%u", m->lineno);
|
||||
(void) fprintf(stderr, ">>>>>>>> %u" + 8 - (m->cont_level & 7),
|
||||
(void) fprintf(stderr, "%.*s %u", (m->cont_level & 7) + 1, ">>>>>>>>",
|
||||
m->offset);
|
||||
|
||||
if (m->flag & INDIR) {
|
||||
|
4
external/bsd/file/lib/Makefile
vendored
4
external/bsd/file/lib/Makefile
vendored
@ -1,4 +1,4 @@
|
||||
# $NetBSD: Makefile,v 1.1 2009/05/08 17:28:02 christos Exp $
|
||||
# $NetBSD: Makefile,v 1.2 2011/08/14 09:06:12 christos Exp $
|
||||
#
|
||||
|
||||
USE_FORT?= yes # data driven bugs?
|
||||
@ -32,4 +32,6 @@ MLINKS+= libmagic.3 magic_open.3 \
|
||||
INCS= magic.h
|
||||
INCSDIR= /usr/include
|
||||
|
||||
COPTS.softmagic.c = -Wno-format-nonliteral
|
||||
|
||||
.include <bsd.lib.mk>
|
||||
|
Loading…
Reference in New Issue
Block a user