mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Fix -Wunused-but-set-warning with ret
While here, resolve Coverity warnings by demonstrating that vfprintf's return value is being explicitly ignored. MFC after: 1 week Reported by: gcc 6.3.0 Tested with: clang, gcc 4.2.1, gcc 6.3.0 Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
6c5b1b394d
commit
513bdaa141
1 changed files with 2 additions and 3 deletions
|
|
@ -14,7 +14,7 @@ error(char *fmt, ...)
|
|||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
vfprintf(stderr, fmt, ap);
|
||||
(void)vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
|
|
@ -24,11 +24,10 @@ error(char *fmt, ...)
|
|||
int
|
||||
warning(char *fmt, ...)
|
||||
{
|
||||
int ret;
|
||||
va_list ap;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vfprintf(stderr, fmt, ap);
|
||||
(void)vfprintf(stderr, fmt, ap);
|
||||
va_end(ap);
|
||||
fprintf(stderr, "\n");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue