Re: [PATCH] Fix const warnings on Arch linux with the latest glibc.

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <aZ74KHABX_scv67Q@qinghai>
On Wed, Feb 25, 2026 at 02:19:31PM +0100, Rene Kita wrote:
>This was actually incorrect. There are still two other problems
>concerning const. I was in a hurry, sorry for that.
>
>util.c: In function ‘imap_parse_path’:
>util.c:368:7: error: assignment discards ‘const’ qualifier from pointer target
>type [-Werror=discarded-qualifiers]
>  368 |     c = strchr (path, '}');
>      |       ^
>util.c: In function ‘imap_get_literal_count’:
>util.c:614:20: error: assignment discards ‘const’ qualifier from pointer target
>type [-Werror=discarded-qualifiers]
>  614 |   if (!buf || !(pc = strchr (buf, '{')))
>      |                    ^
>
>This is in imap/util.c and needs:
>./configure --enable-gpgme --enable-pop --enable-imap \
>  --enable-smtp --enable-hcache --enable-sidebar \
>  --without-included-gettext --with-mailpath=/var/spool/mail \
>  --with-curses --with-ssl --with-sasl --with-idn2
>
>From I quick look I think in the first case we don't need to write to
>*c, but making it const gives another error when passing it to
>url_parse_ciss.

Okay, I will take a look at this more closely tomorrow.  Thanks Rene!

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmme+CgACgkQre92hIAx
a9o0uxAAxoLBgn9imGATEnzuVPqUHFykUdMr36Dq4L9fvgwnGh6wOu13xBm7CWHV
PswEpXxYSXYuIHHlyxuZFaUv6CAbxtIl4zymWYbR5s70Kq71IOTPZhDjZyqNgFr5
kiFjlOM4rHNS3NwhDOjsud1czNdhwabc9EpcILbvvS3KTKPJWUwWJcS1ZHI3FZ0O
aM5ydsWfCyGeB3mVOX2i18XoxKp9qTYsgjlE3CvuqX54MCR9A9L68TgYN15Hrg5k
CuUzGBAlHM42o2ClFlxSRvkJpNq9S7JMBN2+KEwhmGKWB+TTwXzWTtFKEY1pbBd3
b3ATkFxMw7UWA9GBR/BmzH+tjc+f1ePpyOV5/vRaWjb0edR21IbYyrICWmiuRPVe
iqYAFLOYcr99bgjRNHKD+ZZBIlpVj3s2SeXr0s8jzPzoXNH2YlsFe1W2Ak+7GxiD
qBeAWGf5RQt9zqMJNUYuj8/+0v23NxNqJYTyAS+qM/+4niVHnpiTavc4jtiAFdv3
WuD0Uo3nE9EJ7n+0bKWoJgo2RgW1pUKAWDl85K4I6qghxUroJHpbNDHGPfj7THyv
i/Zx1iQlYN8rmWLgEz3zYFwiqbfXaF484zEF1FcTX88LxJskSp9iPON/hV5iz1zf
8fNxCHZUa2AkY1O7lAxtDfqeIDdU7cqwS8ftw1L3q97t6tWcEYk=
=279V
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.