This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 203166

Summary: Warnings durring compile
Product: [Fedora] Fedora Reporter: Marcin Garski <mgarski>
Component: coreutilsAssignee: Tim Waugh <twaugh>
Status: CLOSED RAWHIDE QA Contact:
Severity: low Docs Contact:
Priority: medium    
Version: rawhideCC: meyering, redhat-bugzilla
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 5.97-9 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-08-24 12:23:10 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Marcin Garski 2006-08-18 14:32:17 EDT
Compiling coreutils-5.97-7 gives following warnings (apply to Red Hat patches, I
report this instead of attach patch because I'm only sure how to properly
resolve this issues with mkfifo.c file):

---
acl.c: In function 'file_has_acl':
acl.c:75: warning: implicit declaration of function 'acl_extended_file'
acl.c: In function 'copy_acl':
acl.c:109: warning: implicit declaration of function 'error'
acl.c:109: warning: implicit declaration of function 'quote'
acl.c:120: warning: implicit declaration of function 'acl_entries'

SUGGESTED RESOLUTION:
#include <sys/acl.h> (for acl_extended_file() and acl_entries())
#include "error.h" (for error())
#include "quote.h" (for quote())
---

---
cp.c: In function 're_protect':
cp.c:345: warning: implicit declaration of function 'copy_acl'

SUGGESTED RESOLUTION:
#include "acl.h" (for copy_acl())
---

---
copy.c: In function 'copy_reg':
copy.c:475: warning: implicit declaration of function 'copy_acl'
copy.c:487: warning: implicit declaration of function 'set_acl'

SUGGESTED RESOLUTION:
#include "acl.h" (for copy_acl() and set_acl())
---

---
mkfifo.c: In function 'usage':
mkfifo.c:68: warning: too many arguments for format

SUGGESTED RESOLUTION:
Use fputs() instead of printf()
---

---
stat.c: In function 'do_statfs':
stat.c:717: warning: 'return' with no value, in function returning non-void
stat.c:761: warning: this function may return with or without a value

SUGGESTED RESOLUTION:
'return true;' or 'return false;' instead of 'return;'
---

---
pr.c: In function 'print_char_multi':
pr.c:2489: warning: pointer targets in passing argument 2 of 'mbrtowc' differ in
signedness

SUGGESTED RESOLUTION:
Remove unisgned from mbc definition 'static unsigned char mbc[MB_LEN_MAX] =
{'\0'};' and from 'mbc[mbc_pos++] = (unsigned char)c;' ?
---

---
uname.c: In function 'main':
uname.c:318: warning: initialization discards qualifiers from pointer target type

SUGGESTED RESOLUTION:
Remove from coreutils-4.5.3-sysinfo.patch following lines:
-      char const *element = unknown;
+      char *element = unknown;
---

---
su.c: In function 'run_shell':
su.c:653: warning: 'return' with a value, in function returning void
su.c:655: warning: 'return' with a value, in function returning void

SUGGESTED RESOLUTION:
Dunno :|
---
Comment 1 Tim Waugh 2006-08-24 12:23:10 EDT
Thanks!  The uname.c wasn't quite correct (needed 'unknown' to be declared not
const), and it was acl/libacl.h not sys/acl.h.

Should be fewer warnings introduced by our patches now. :-)