[Bug 2767] New: Missing includes in bsd-err.c
bugzilla-daemon at bugzilla.mindrot.org
bugzilla-daemon at bugzilla.mindrot.org
Sat Aug 26 21:19:58 AEST 2017
https://bugzilla.mindrot.org/show_bug.cgi?id=2767
Bug ID: 2767
Summary: Missing includes in bsd-err.c
Product: Portable OpenSSH
Version: -current
Hardware: Other
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Miscellaneous
Assignee: unassigned-bugs at mindrot.org
Reporter: cjwatson at debian.org
Created attachment 3040
--> https://bugzilla.mindrot.org/attachment.cgi?id=3040&action=edit
Add missing includes to openbsd-compat/bsd-err.c
gcc -g -O2 -Wall -Wpointer-arith -Wuninitialized -Wsign-compare
-Wformat-security -Wsizeof-pointer-memaccess -Wno-pointer-sign
-Wno-unused-result -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -ftrapv
-fno-builtin-memset -fstack-protector-strong -fPIE -I. -I.. -I. -I./..
-DHAVE_CONFIG_H -c bsd-err.c
bsd-err.c: In function ‘err’:
bsd-err.c:37:26: warning: implicit declaration of function ‘strerror’;
did you mean ‘hstrerror’? [-Wimplicit-function-declaration]
fprintf(stderr, "%s: ", strerror(errno));
^~~~~~~~
hstrerror
bsd-err.c:37:20: warning: format ‘%s’ expects argument of type ‘char
*’, but argument 3 has type ‘int’ [-Wformat=]
fprintf(stderr, "%s: ", strerror(errno));
~^ ~~~~~~~~~~~~~~~
%d
bsd-err.c: In function ‘warn’:
bsd-err.c:66:20: warning: format ‘%s’ expects argument of type ‘char
*’, but argument 3 has type ‘int’ [-Wformat=]
fprintf(stderr, "%s: ", strerror(errno));
~^ ~~~~~~~~~~~~~~~
%d
I went through and added all the missing #includes in the attached
patch. Some duplicate "includes.h", but it seems to be reasonably
common practice in OpenSSH to add direct #includes for symbols that are
used directly.
--
You are receiving this mail because:
You are watching the assignee of the bug.
More information about the openssh-bugs
mailing list