bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Windows build warnings for iconv 1.16 and gettext 0.21


From: Bruno Haible
Subject: Re: Windows build warnings for iconv 1.16 and gettext 0.21
Date: Thu, 17 Oct 2024 17:11:22 +0200

Hi Michele,

Michele Locati wrote in
<https://lists.gnu.org/archive/html/bug-gettext/2020-07/msg00036.html>:

> when compiling iconv 1.16 and gettext 0.21 for Windows I see some
> warnings (not sure if some of them also apply to posix systems).

Thanks for looking at the warnings. On non-GNU systems, we don't
have warning-free builds (because it's not worth the effort), so we
scan through the list of warnings occasionally.

Generally, warnings that occur in many places have less relevance.
The warnings to look at particularly are those which occur only once
or twice.

> gettext-0.21/gettext-tools/gnulib-lib/execute.c:153:47: warning:
> passing argument 3 of 'spawnvpe' from incompatible pointer type
> [-Wincompatible-pointer-types]

These are mismatches between 'char *' and 'const char *', or
between 'char **' and 'const char **'. The exec* and spawn* functions
are known to produce these warnings, because the C language does
not compare such types as intelligently as C++ does.

> When compiling for 64 bits, I also see these warnings:
> 
> libiconv-1.16/lib/iconv.c:175:43: warning: cast from pointer to
> integer of different size [-Wpointer-to-int-cast]

When I put a cast into the code, it is to force a certain behaviour.
So, you can ignore all warnings about casts.

> Finally, when compiling for shared builds (both for 32 and 64 bits), I
> see those warnings:
> 
> libiconv-1.16/lib/iconv.c:598:5: warning: '_libiconv_version'
> redeclared without dllimport attribute: previous dllimport ignored
> [-Wattributes]

These could be dangerous. But the experience shows that these warnings
are harmless. The compiler and linker apparently do the right thing anyway.

Bruno






reply via email to

[Prev in Thread] Current Thread [Next in Thread]