Age | Commit message (Collapse) | Author |
|
In the first case:
pio.c: In function ‘main’:
pio.c:355:4: warning: this statement may fall through [-Wimplicit-fallthrough=]
usage(0);
^~~~~~~~
pio.c:356:3: note: here
case 'm':
^~~~
The fallthrough is not intended because `usage()` never returns (it calls
`exit` unconditionally). Annotate as `noreturn` so the compiler realises this.
In the second case:
fexc.c: In function ‘main’:
fexc.c:312:15: warning: this statement may fall through [-Wimplicit-fallthrough=]
filename[1] = argv[optind+1]; /* out */
~~~~~~~~~~~~^~~~~~~~~~~~~~~~
fexc.c:313:2: note: here
case 1:
^~~~
The fallthrough appears to be intended (the two argument case is a superset of
the one argument case). Annotate with a comment which tells the compiler this
is intended.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
|
|
main() should return 0 if execution was successful.
Signed-off-by: Andre Przywara <osp@andrep.de>
|
|
Signed-off-by: Andre Przywara <osp@andrep.de>
|
|
By defining NO_MMAP it's now possible to avoid the usage of
mmap() and munmap(). This benefits platforms that don't support
these functions, e.g. Windows.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
|
|
This way we don't have to introduce new options for retrieving
version info. For those programs that do not output their usage
by default (e.g. because they would process stdin), you may pass
a "-?" option to get help - and thus version information.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
|
|
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
|
|
For Linux, this requires additional #defines, see
https://gist.github.com/panzi/6856583#gistcomment-1656524
Placing those #defines into portable_endian.h would mean we
depend on the specific order of #includes (whatever pulls
in endian.h first, including other system includes). Avoid
this by using symbols provided "globally" via the Makefile.
Also nuke the _NETBSD_SOURCE definition in fel.c
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
|
|
Our previous include file only supplied a very limited set of
wrapper redefinitions for platforms that define __APPLE__ (i.e.
Mac OS). In particular, some needed big endian conversions were
missing, causing "symbol(s) not found" errors when linking.
Instead of patching the existing file, let's do away with it
completely and replace it by something more sophisticated.
The portable_endian.h used is in the public domain, and was
taken from https://gist.github.com/panzi/6856583
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
|
|
With glibc 2.20 (and newer), defining _BSD_SOURCE (only)
will now generate compiler warnings similar to:
/usr/include/features.h:148:3: warning: #warning "_BSD_SOURCE
and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
See the glibc 2.20 release notes, https://lwn.net/Articles/611162/.
This patch adds the required _DEFAULT_SOURCE.
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
Acked-by: Siarhei Siamashka <siarhei.siamashka@gmail.com>
|
|
Signed-off-by: Michal Suchanek <hramrach@gmail.com>
Signed-off-by: Henrik Nordstrom <henrik@henriknordstrom.net>
|
|
|
|
|
|
and remove unused macro
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|