mirror of
https://github.com/LiBwrt-op/openwrt-6.x.git
synced 2026-01-09 04:35:22 +00:00
Looking into /usr/include/stdlib.h, there's a `devname()` function defined
under some #ifdef's which conflicts with the `static char *devname` definition
in `src/mkwrggimg.c`.
Defining `_ANSI_SOURCE` in the `src/mkwrggimg.c` file, omits that part of the
header.
Another more intrusive approach is to rename `devname` to something like
`g_devname` in `src/mkwrggimg.c`. But I think the `_ANSI_SOURCE` define should
be enough.
Compilation error is:
src/mkwrggimg.c:64:14: error: redefinition of 'devname' as different kind of symbol
static char *devname;
^
/usr/include/stdlib.h:286:7: note: previous definition is here
char *devname(dev_t, mode_t);
^
src/mkwrggimg.c:147:12: error: non-object type 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') is not assignable
devname = optarg;
~~~~~~~ ^
src/mkwrggimg.c:192:6: warning: comparison of function 'devname' equal to a null pointer is always false [-Wtautological-pointer-compare]
if (devname == NULL) {
^~~~~~~ ~~~~
src/mkwrggimg.c:192:6: note: prefix with the address-of operator to silence this warning
if (devname == NULL) {
^
&
src/mkwrggimg.c:251:27: warning: incompatible pointer types passing 'char *(dev_t, mode_t)' (aka 'char *(int, unsigned short)') to parameter of type 'const char *' [-Wincompatible-pointer-types]
strncpy(header->devname, devname, sizeof(header->devname));
^~~~~~~
/usr/include/secure/_string.h:119:34: note: expanded from macro 'strncpy'
__builtin___strncpy_chk (dest, src, len, __darwin_obsz (dest))
Signed-off-by: Alexandru Ardelean <ardeleanalex@gmail.com>
[Jo-Philipp Wich: slightly reformat commit message]
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
|
||
|---|---|---|
| .. | ||
| add_header.c | ||
| addpattern.c | ||
| asustrx.c | ||
| bcm_tag.h | ||
| bcmalgo.c | ||
| bcmalgo.h | ||
| buffalo-enc.c | ||
| buffalo-lib.c | ||
| buffalo-lib.h | ||
| buffalo-tag.c | ||
| buffalo-tftp.c | ||
| csysimg.h | ||
| cyg_crc16.c | ||
| cyg_crc32.c | ||
| cyg_crc.h | ||
| dgfirmware.c | ||
| dgn3500sum.c | ||
| edimax_fw_header.c | ||
| encode_crc.c | ||
| fix-u-media-header.c | ||
| fw.h | ||
| hcsmakeimage.c | ||
| imagetag_cmdline.c | ||
| imagetag_cmdline.h | ||
| imagetag.c | ||
| imagetag.ggo | ||
| jcgimage.c | ||
| lzma2eva.c | ||
| makeamitbin.c | ||
| md5.c | ||
| md5.h | ||
| mkbrncmdline.c | ||
| mkbrnimg.c | ||
| mkcameofw.c | ||
| mkcasfw.c | ||
| mkchkimg.c | ||
| mkcsysimg.c | ||
| mkdapimg.c | ||
| mkdcs932.c | ||
| mkdniimg.c | ||
| mkedimaximg.c | ||
| mkfwimage2.c | ||
| mkfwimage.c | ||
| mkheader_gemtek.c | ||
| mkhilinkfw.c | ||
| mkmerakifw-old.c | ||
| mkmerakifw.c | ||
| mkmylofw.c | ||
| mkplanexfw.c | ||
| mkporayfw.c | ||
| mkrtn56uimg.c | ||
| mksenaofw.c | ||
| mktitanimg.c | ||
| mktitanimg.h | ||
| mktplinkfw2.c | ||
| mktplinkfw.c | ||
| mkwrggimg.c | ||
| mkwrgimg.c | ||
| mkzcfw.c | ||
| mkzynfw.c | ||
| motorola-bin.c | ||
| myloader.h | ||
| nand_ecc.c | ||
| osbridge-crc.c | ||
| oseama.c | ||
| pc1crypt.c | ||
| ptgen.c | ||
| seama.c | ||
| seama.h | ||
| sha1.c | ||
| sha1.h | ||
| spw303v.c | ||
| srec2bin.c | ||
| tplink-safeloader.c | ||
| trx2edips.c | ||
| trx2usr.c | ||
| trx.c | ||
| wrt400n.c | ||
| xorimage.c | ||
| zynos.h | ||
| zyxbcm.c | ||