Skip to content

fuse-ext2.c: error: initialization of 'int (*)(const char *, const char *, char *, size_t, uint32_t)' {aka 'int (*)(const char *, const char *, char *, long unsigned int, unsigned int)'} from incompatible pointer type #151

Description

@barracuda156

With gcc-14 the build fails on:

--->  Building fuse-ext2
Executing:  cd "/opt/local/var/macports/build/fuse-ext2-cbb594de/work/fuse-ext2-0.0.11" && /usr/bin/make -j2 -w all 
make: Entering directory `/opt/local/var/macports/build/fuse-ext2-cbb594de/work/fuse-ext2-0.0.11'
/usr/bin/make  all-recursive
make[1]: Entering directory `/opt/local/var/macports/build/fuse-ext2-cbb594de/work/fuse-ext2-0.0.11'
Making all in fuse-ext2
make[2]: Entering directory `/opt/local/var/macports/build/fuse-ext2-cbb594de/work/fuse-ext2-0.0.11/fuse-ext2'
/opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -I/opt/local/include/osxfuse -I/opt/local/include/osxfuse/fuse -Wall -DHAVE_CONFIG_H -I@PREFIX@/include -pipe -Os -I/opt/local/include/osxfuse -I/opt/local/include/osxfuse/fuse -arch ppc -MT fuse_ext2-fuse-ext2.o -MD -MP -MF .deps/fuse_ext2-fuse-ext2.Tpo -c -o fuse_ext2-fuse-ext2.o `test -f 'fuse-ext2.c' || echo './'`fuse-ext2.c
/opt/local/bin/gcc-mp-14 -DHAVE_CONFIG_H -I. -I..   -I/opt/local/include -I/opt/local/include/osxfuse -I/opt/local/include/osxfuse/fuse -Wall -DHAVE_CONFIG_H -I@PREFIX@/include -pipe -Os -I/opt/local/include/osxfuse -I/opt/local/include/osxfuse/fuse -arch ppc -MT fuse_ext2-do_probe.o -MD -MP -MF .deps/fuse_ext2-do_probe.Tpo -c -o fuse_ext2-do_probe.o `test -f 'do_probe.c' || echo './'`do_probe.c
fuse-ext2.c:301:27: error: initialization of 'int (*)(const char *, const char *, char *, size_t,  uint32_t)' {aka 'int (*)(const char *, const char *, char *, long unsigned int,  unsigned int)'} from incompatible pointer type 'int (*)(const char *, const char *, char *, size_t)' {aka 'int (*)(const char *, const char *, char *, long unsigned int)'} [-Wincompatible-pointer-types]
  301 |         .getxattr       = op_getxattr,
      |                           ^~~~~~~~~~~
fuse-ext2.c:301:27: note: (near initialization for 'ext2fs_ops.getxattr')
In file included from /usr/include/string.h:148,
                 from fuse-ext2.h:27,
                 from do_probe.c:21:
do_probe.c: In function 'do_probe':
do_probe.c:49:59: warning: pointer targets in passing argument 2 of '__builtin___strncpy_chk' differ in signedness [-Wpointer-sign]
   49 |                         strncpy(opts->volname, e2fs->super->s_volume_name, VOLNAME_SIZE_MAX);
      |                                                ~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                                                           |
      |                                                           __u8 * {aka unsigned char *}
do_probe.c:49:59: note: expected 'const char *' but argument is of type '__u8 *' {aka 'unsigned char *'}
do_probe.c:49:59: warning: pointer targets in passing argument 2 of '__inline_strncpy_chk' differ in signedness [-Wpointer-sign]
   49 |                         strncpy(opts->volname, e2fs->super->s_volume_name, VOLNAME_SIZE_MAX);
      |                                                ~~~~~~~~~~~^~~~~~~~~~~~~~~
      |                                                           |
      |                                                           __u8 * {aka unsigned char *}
/usr/include/secure/_string.h:113:71: note: expected 'const char * restrict' but argument is of type '__u8 *' {aka 'unsigned char *'}
  113 | __inline_strncpy_chk (char *__restrict __dest, const char *__restrict __src,
      |                                                ~~~~~~~~~~~~~~~~~~~~~~~^~~~~
make[2]: *** [fuse_ext2-fuse-ext2.o] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions