mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-19 14:31:48 +01: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
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=315200
@ -14,7 +14,7 @@ error(char *fmt, ...)
|
|||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
vfprintf(stderr, fmt, ap);
|
(void)vfprintf(stderr, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
|
|
||||||
@ -24,11 +24,10 @@ error(char *fmt, ...)
|
|||||||
int
|
int
|
||||||
warning(char *fmt, ...)
|
warning(char *fmt, ...)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
|
||||||
va_start(ap, fmt);
|
va_start(ap, fmt);
|
||||||
ret = vfprintf(stderr, fmt, ap);
|
(void)vfprintf(stderr, fmt, ap);
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
fprintf(stderr, "\n");
|
fprintf(stderr, "\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user