Silence some of the -Wnon-const-format warnings and add __printflike()
to a function prototype which needs it. Approved by: brian MFC After: 2 weeks
This commit is contained in:
parent
8e18db5a52
commit
0c50e5287e
@ -1570,7 +1570,7 @@ SetVariable(struct cmdargs const *arg)
|
|||||||
mp_RestartAutoloadTimer(&arg->bundle->ncp.mp);
|
mp_RestartAutoloadTimer(&arg->bundle->ncp.mp);
|
||||||
} else {
|
} else {
|
||||||
err = "Set autoload requires three arguments\n";
|
err = "Set autoload requires three arguments\n";
|
||||||
log_Printf(LogWARN, err);
|
log_Printf(LogWARN, "%s", err);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1605,7 +1605,7 @@ SetVariable(struct cmdargs const *arg)
|
|||||||
l->ccp.cfg.deflate.in.winsize = 0;
|
l->ccp.cfg.deflate.in.winsize = 0;
|
||||||
} else {
|
} else {
|
||||||
err = "No window size specified\n";
|
err = "No window size specified\n";
|
||||||
log_Printf(LogWARN, err);
|
log_Printf(LogWARN, "%s", err);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1662,7 +1662,7 @@ SetVariable(struct cmdargs const *arg)
|
|||||||
cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val;
|
cx->physical->link.lcp.cfg.accmap = (u_int32_t)ulong_val;
|
||||||
} else {
|
} else {
|
||||||
err = "No accmap specified\n";
|
err = "No accmap specified\n";
|
||||||
log_Printf(LogWARN, err);
|
log_Printf(LogWARN, "%s", err);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -1831,7 +1831,7 @@ SetVariable(struct cmdargs const *arg)
|
|||||||
bundle_SetIdleTimer(arg->bundle, timeout, min);
|
bundle_SetIdleTimer(arg->bundle, timeout, min);
|
||||||
}
|
}
|
||||||
if (err)
|
if (err)
|
||||||
log_Printf(LogWARN, err);
|
log_Printf(LogWARN, "%s", err);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case VAR_LQRPERIOD:
|
case VAR_LQRPERIOD:
|
||||||
@ -2005,7 +2005,7 @@ SetVariable(struct cmdargs const *arg)
|
|||||||
return physical_SetParity(arg->cx->physical, argp);
|
return physical_SetParity(arg->cx->physical, argp);
|
||||||
else {
|
else {
|
||||||
err = "Parity value must be odd, even or none\n";
|
err = "Parity value must be odd, even or none\n";
|
||||||
log_Printf(LogWARN, err);
|
log_Printf(LogWARN, "%s", err);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2016,7 +2016,7 @@ SetVariable(struct cmdargs const *arg)
|
|||||||
physical_SetRtsCts(arg->cx->physical, 0);
|
physical_SetRtsCts(arg->cx->physical, 0);
|
||||||
else {
|
else {
|
||||||
err = "RTS/CTS value must be on or off\n";
|
err = "RTS/CTS value must be on or off\n";
|
||||||
log_Printf(LogWARN, err);
|
log_Printf(LogWARN, "%s", err);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -75,7 +75,12 @@ extern void prompt_Printf(struct prompt *, const char *, ...)
|
|||||||
#else
|
#else
|
||||||
extern void prompt_Printf(struct prompt *, const char *, ...);
|
extern void prompt_Printf(struct prompt *, const char *, ...);
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef __GNUC__
|
||||||
|
extern void prompt_vPrintf(struct prompt *, const char *, _BSD_VA_LIST_)
|
||||||
|
__attribute__ ((format (printf, 2, 0)));
|
||||||
|
#else
|
||||||
extern void prompt_vPrintf(struct prompt *, const char *, _BSD_VA_LIST_);
|
extern void prompt_vPrintf(struct prompt *, const char *, _BSD_VA_LIST_);
|
||||||
|
#endif
|
||||||
#define PROMPT_DONT_WANT_INT 1
|
#define PROMPT_DONT_WANT_INT 1
|
||||||
#define PROMPT_WANT_INT 0
|
#define PROMPT_WANT_INT 0
|
||||||
extern void prompt_TtyInit(struct prompt *);
|
extern void prompt_TtyInit(struct prompt *);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user