List Archive

Thread

Thread Index

Message

From: Remi Collet <remi%fedoraproject.org@localhost>
To: libzip-discuss%nih.at@localhost
Subject: Re: libzip-1.1 released
Date: Thu, 28 Jan 2016 14:17:01 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Le 28/01/2016 14:06, Thomas Klausner a écrit :
> 
> On Thu, Jan 28, 2016 at 01:42:41PM +0100, Remi Collet wrote:
>> Build is broken
>> 
>> ziptool.c: In function 'main': ziptool.c:1013:61: error: 'optopt'
>> undeclared (first use in this functio n) snprintf(reason,
>> sizeof(reason), "invalid option -%c", optopt);
> 
> Does adding
> 
> extern int optopt;
> 
> at the top of the file fix this for you?

Yes... but this look a bit strange...

switch (c) {
...
default:
    snprintf(reason, sizeof(reason), "invalid option -%c", optopt);

"c" seems a valid fix... the char being checked (the switch)...


Remi.



> Thomas
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlaqFMoACgkQYUppBSnxahggPwCeMBkiwKth5hBYCLa/J72ORj7l
ftUAnRnUziwIWri34rXsU49SdAcT/PfN
=jSYj
-----END PGP SIGNATURE-----

Made by MHonArc.