[PATCH] Silence 'may be used uninitialized in this function' warnings

Werner Koch wk at gnupg.org
Wed Jan 20 13:59:48 CET 2021


On Tue, 19 Jan 2021 20:14, Jussi Kivilinna said:

> Warnings were seen on gcc-s390x build with optimization level -O3.

In general I don't like to silence such warning because later compiler
versions are often fixed to detect such wrong warnings.  The
initialization may in some cases even inhibit the compiler to detect
other errors.  

> -  ARCFOUR_context ctx;
> +  ARCFOUR_context ctx = { { 0, }, };

The context is initialized in do_arcfour_setkey.  Trailing commas are
not needed and HP compilers may bail out here.

I suggest not to apply this patch.


Salam-Shalom,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 227 bytes
Desc: not available
URL: <https://lists.gnupg.org/pipermail/gcrypt-devel/attachments/20210120/1d0337b6/attachment.sig>


More information about the Gcrypt-devel mailing list