bug-wget
[Top][All Lists]
Advanced

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

Re: [Bug-wget] [PATCH] Fixing C89 warnings


From: Jérémie Courrèges-Anglas
Subject: Re: [Bug-wget] [PATCH] Fixing C89 warnings
Date: Wed, 03 Dec 2014 15:20:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (berkeley-unix)

Gisle Vanem <address@hidden> writes:

>> That's really good news to me. But there are still lots
>> more C99 "errors". Espesially in main.c.
>
> Now another C99 "error" got into openssl.c. Patch:

Heh, when I patched wget-1.16 I took example on the code around to
decide where to declare the variable.  And indeed the "meth" variable
decl had since moved in the git repo.  Sorry for not doing my
homework. :)

> --- Git-latest/src/openssl.c    2014-12-03 14:06:19 +0000
> +++ openssl.c   2014-12-03 14:14:37 +0000
> @@ -170,6 +170,7 @@
>  ssl_init (void)
>  {
>    SSL_METHOD const *meth;
> +  long ssl_options = 0;
>
>  #if OPENSSL_VERSION_NUMBER >= 0x00907000
>    if (ssl_true_initialized == 0)
> @@ -203,8 +204,6 @@
>    SSLeay_add_all_algorithms ();
>    SSLeay_add_ssl_algorithms ();
>
> -  long ssl_options = 0;
> -
>    switch (opt.secure_protocol)
>      {
>  #ifndef OPENSSL_NO_SSL2
>
> -----------
>
> FYI. There are gcc options to trigger an error for these
>   cases. Such as "gcc -Wdeclaration-after-statement -Werror".
>   But there are other harmless warnings.

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE



reply via email to

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