Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 921432 - net-ftp/filezilla (gcc14) error: passing argument 1 of ‘next_int’ from incompatible pointer type [-Wincompatible-pointer-types]
Summary: net-ftp/filezilla (gcc14) error: passing argument 1 of ‘next_int’ from incomp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Bernard Cafarelli
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: c99-porting
  Show dependency tree
 
Reported: 2024-01-06 05:20 UTC by immolo
Modified: 2024-01-09 12:04 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (filezilla.log.log,267.75 KB, text/x-log)
2024-01-06 05:20 UTC, immolo
Details
removes a const and fixes some warnings in the same file (gcc14-fixes.patch,892 bytes, patch)
2024-01-06 06:00 UTC, Christopher Fore
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description immolo 2024-01-06 05:20:08 UTC
Created attachment 881525 [details]
build log

unix/uxsftp.c:224:48: error: passing argument 1 of ‘next_int’ from incompatible pointer type [-Wincompatible-pointer-types]
  224 |             f->buffer_ = f->memory_ + next_int(&p);
      |                                                ^~
      |                                                |
      |                                                const char **
In file included from ./putty.h:2437,
                 from unix/uxsftp.c:17:
./fzsftp.h:31:28: note: expected ‘char **’ but argument is of type ‘const char **’
   31 | uintptr_t next_int(char ** s);
      |                    ~~~~~~~~^
unix/uxsftp.c:225:43: error: passing argument 1 of ‘next_int’ from incompatible pointer type [-Wincompatible-pointer-types]
  225 |             f->remaining_ = (int)next_int(&p);
      |                                           ^~
      |                                           |
      |                                           const char **
./fzsftp.h:31:28: note: expected ‘char **’ but argument is of type ‘const char **’
   31 | uintptr_t next_int(char ** s);
      |                    ~~~~~~~~^
unix/uxsftp.c:227:15: warning: passing argument 1 of ‘safefree’ discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
  227 |         sfree(s);
      |               ^
In file included from ./misc.h:9,
                 from ./putty.h:10:
./puttymem.h:21:15: note: expected ‘void *’ but argument is of type ‘const char *’
   21 | void safefree(void *);
      |               ^~~~~~
make[2]: *** [Makefile:2725: unix/fzsftp-uxsftp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/var/tmp/portage/net-ftp/filezilla-3.66.4/work/filezilla-3.66.4/src/putty'
make[1]: *** [Makefile:439: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/net-ftp/filezilla-3.66.4/work/filezilla-3.66.4/src'
make: *** [Makefile:637: all-recursive] Error 1

Steps to reproduce:

1. Setup stage3 with gcc14
2. emerge -va filezilla

emerge --info:

Portage 3.0.60 (python 3.11.7-final-0, default/linux/amd64/23.0/desktop, gcc-14, glibc-2.38-r9, 6.1.11-gentoo-dist x86_64)
=================================================================
System uname: Linux-6.1.11-gentoo-dist-x86_64-AMD_Ryzen_9_5950X_16-Core_Processor-with-glibc2.38
KiB Mem:    65768708 total,  40222072 free
KiB Swap:    8392700 total,   8392700 free
Timestamp of repository gentoo: Thu, 04 Jan 2024 16:30:01 +0000
Head commit of repository gentoo: 804b980d2d3c5c257ff0ebbb4603e6418e2861c5
Head commit of repository frno7: 57198b57bee2118191924c610faebf1bbc0d3704

Timestamp of repository guru: Thu, 04 Jan 2024 15:33:00 +0000
Head commit of repository guru: 58f7d28451d2d95db70cee3bce584e881bbef758

Timestamp of repository menelkir: Sat, 30 Dec 2023 16:32:01 +0000
Head commit of repository menelkir: 251828a888cbaac4e73b6607a109a24e46856489

Timestamp of repository raiagent: Tue, 02 Jan 2024 04:01:55 +0000
Head commit of repository raiagent: 6ece421a418850571e23b0d68e8a814808934ef8

Timestamp of repository ruixi-overlay: Tue, 26 Dec 2023 14:18:28 +0000
Head commit of repository ruixi-overlay: f4982d9943bf39be69534768599f460938b8cdf5

Timestamp of repository steam-overlay: Mon, 01 Jan 2024 00:16:53 +0000
Head commit of repository steam-overlay: c7b0a4c499322c5feed8ad20e37266c1e1cede40

sh bash 5.2_p21-r1
ld GNU ld (Gentoo 2.39 p5) 2.39.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p21-r1::gentoo
dev-java/java-config:      2.3.3-r1::gentoo
dev-lang/perl:             5.38.2-r1::gentoo
dev-lang/python:           3.10.12::gentoo, 3.11.7::gentoo, 3.12.1_p1::gentoo
dev-lang/rust:             1.74.1::gentoo
dev-util/cmake:            3.28.1::gentoo
dev-util/meson:            9999::gentoo
sys-apps/baselayout:       2.14-r1::gentoo
sys-apps/openrc:           0.52.1::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.13-r8::gentoo, 2.71-r7::gentoo, 2.72-r1::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40-r6::gentoo, 2.41-r3::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/gcc:             11.3.1_p20221209::gentoo, 12.2.1_p20230121-r1::gentoo, 13.2.1_p20230826::gentoo, 14.0.0_pre20231231::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             14.0.6-r1::gentoo, 15.0.7::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/llvm:            14.0.6-r4::gentoo, 15.0.7-r3::gentoo, 16.0.6::gentoo, 17.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/glibc:            2.38-r9::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-metamanifest: yes
    sync-rsync-verify-max-age: 3
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1

frno7
    location: /var/db/repos/frno7
    sync-type: git
    sync-uri: https://github.com/frno7/gentoo.overlay.git
    masters: gentoo
    volatile: False

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

local
    location: /var/db/repos/local
    masters: gentoo
    volatile: False

menelkir
    location: /var/db/repos/menelkir
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/menelkir.git
    masters: gentoo
    volatile: False

raiagent
    location: /var/db/repos/raiagent
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/raiagent.git
    masters: gentoo
    volatile: False

ruixi-overlay
    location: /var/db/repos/ruixi-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/ruixi-overlay.git
    masters: gentoo
    volatile: False

steam-overlay
    location: /var/db/repos/steam-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/steam-overlay.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=znver2 -flto -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -fdiagnostics-color=always"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-O2 -pipe -march=znver2 -flto -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -fdiagnostics-color=always"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=znver2 -flto -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -fdiagnostics-color=always"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=znver2 -flto -fgraphite-identity -floop-nest-optimize -ftree-loop-distribution -fdiagnostics-color=always"
GENTOO_MIRRORS="https://mirrors.gethosted.online/gentoo/ https://www.mirrorservice.org/sites/distfiles.gentoo.org/ https://mirror.bytemark.co.uk/gentoo/ https://mirrors.soeasyto.com/distfiles.gentoo.org/"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,pack-relative-relocs"
LEX="flex"
LINGUAS="en en_GB"
MAKEOPTS="-j30"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr crypt dbus dist-kernel dri dts dvd dvdr elogind encode exif flac gdbm gif gpm graphite gtk gui iconv icu ipv6 jpeg lcms libnotify libtirpc logrotate lto lzma mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl pam pango pcre pdf pgo png policykit ppds pulseaudio readline sdl seccomp sound spell ssl startup-notification svg test-rust tiff tkip truetype udev udisks unicode upower usb vorbis vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt rdrand sha sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 ntrip navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-GB" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64 i386 sparc64 aarch64 ppc64 m68k ppc64le sh4" QEMU_USER_TARGETS="sparc64 aarch64 mips mips64 mipsel riscv64 m68k ppc ppc64le sh4 arm" RUBY_TARGETS="ruby31" VIDEO_CARDS="nvidia intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Christopher Fore 2024-01-06 06:00:47 UTC
Created attachment 881526 [details, diff]
removes a const and fixes some warnings in the same file

Made sure to run tests with this and they pass.
Comment 2 immolo 2024-01-06 13:55:17 UTC
Confirmed fix my end plus test pass.
Comment 3 Bernard Cafarelli gentoo-dev 2024-01-09 11:56:12 UTC
Thanks all for the bug and patch, let me add it to current 3.66.4 ebuild.

I hope upstream will accept it without waiting for gcc14 release but this code does not move a lot so we can carry it along in the meantime
Comment 4 Larry the Git Cow gentoo-dev 2024-01-09 12:04:07 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e4d96befef64f3a70b00d4976a8377bf2c973471

commit e4d96befef64f3a70b00d4976a8377bf2c973471
Author:     Bernard Cafarelli <voyageur@gentoo.org>
AuthorDate: 2024-01-09 12:03:16 +0000
Commit:     Bernard Cafarelli <voyageur@gentoo.org>
CommitDate: 2024-01-09 12:03:53 +0000

    net-ftp/filezilla: fix incompatible pointer type
    
    This becomes an error in GCC14
    
    Closes: https://bugs.gentoo.org/921432
    Signed-off-by: Bernard Cafarelli <voyageur@gentoo.org>

 .../filezilla/files/filezilla-3.66.4-gcc14.patch   | 27 ++++++++++++++++++++++
 net-ftp/filezilla/filezilla-3.66.4.ebuild          |  3 ++-
 2 files changed, 29 insertions(+), 1 deletion(-)