mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-24 10:52:36 +01:00
WARNS?=6 cleanup for [gs]et[fp]mac:
- Constify structure members that should not be changed during process. - Apply static where needed - signed/unsigned madness - Bump WARNS?= levels from 2 to 6 (this is a diff reduction for a subsequent commit against these Makefile's)
This commit is contained in:
parent
8755b918a1
commit
3e7cb94c9c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=140907
@ -4,6 +4,6 @@ PROG= getfmac
|
||||
MAN= getfmac.8
|
||||
SRCS= getfmac.c
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#define MAXELEMENTS 32
|
||||
|
||||
void
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
|
@ -4,6 +4,6 @@ PROG= getpmac
|
||||
MAN= getpmac.8
|
||||
SRCS= getpmac.c
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#define MAXELEMENTS 32
|
||||
|
||||
void
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
|
@ -5,6 +5,6 @@ LINKS= ${BINDIR}/setfmac ${BINDIR}/setfsmac
|
||||
MAN= setfmac.8 setfsmac.8
|
||||
SRCS= setfmac.c
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -54,7 +54,7 @@ struct label_spec {
|
||||
regex_t regex; /* compiled regular expression to match */
|
||||
char *regexstr; /* uncompiled regular expression */
|
||||
mode_t mode; /* mode to possibly match */
|
||||
char *modestr; /* print-worthy ",-?" mode string */
|
||||
const char *modestr; /* print-worthy ",-?" mode string */
|
||||
char *mactext; /* MAC label to apply */
|
||||
int flags; /* miscellaneous flags */
|
||||
#define F_DONTLABEL 0x01
|
||||
@ -195,13 +195,13 @@ usage(int is_setfmac)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
chomp_line(char **line, size_t *linesize)
|
||||
{
|
||||
char *s;
|
||||
int freeme = 0;
|
||||
|
||||
for (s = *line; s - *line < *linesize; s++) {
|
||||
for (s = *line; (unsigned)(s - *line) < *linesize; s++) {
|
||||
if (!isspace(*s))
|
||||
break;
|
||||
}
|
||||
|
@ -4,6 +4,6 @@ PROG= setpmac
|
||||
MAN= setpmac.8
|
||||
SRCS= setpmac.c
|
||||
|
||||
WARNS?= 2
|
||||
WARNS?= 6
|
||||
|
||||
.include <bsd.prog.mk>
|
||||
|
@ -46,7 +46,7 @@
|
||||
|
||||
#define MAXELEMENTS 32
|
||||
|
||||
void
|
||||
static void
|
||||
usage(void)
|
||||
{
|
||||
|
||||
@ -57,7 +57,7 @@ usage(void)
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
char *shell;
|
||||
const char *shell;
|
||||
mac_t label;
|
||||
int error;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user