From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1VoBeK-0008FF-Uo for mharc-grub-devel@gnu.org; Wed, 04 Dec 2013 07:33:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53384) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoBeE-00088J-EI for grub-devel@gnu.org; Wed, 04 Dec 2013 07:33:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoBe9-0005Sg-0p for grub-devel@gnu.org; Wed, 04 Dec 2013 07:33:46 -0500 Received: from mail-we0-x22b.google.com ([2a00:1450:400c:c03::22b]:44348) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoBe8-0005Sa-Li for grub-devel@gnu.org; Wed, 04 Dec 2013 07:33:40 -0500 Received: by mail-we0-f171.google.com with SMTP id q58so14809988wes.2 for ; Wed, 04 Dec 2013 04:33:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=Z9BgKtNRRsRAGKh8lu6kxviHUUm1ZwXOz7uT8ZEks38=; b=kJZphfhJScnDPYXojziP8dfidQQXuXfBLrCusKqZdAp3PNcimUbP26gLx7ZDaRLSSt yERo3D+CUzZwxu4aitC5/L+dxjjNzPcuNyRHKDvJYT9VR8jHhLz7jnssVYwz6e6Gkqkg o+r1TxlnzL9LhfKe4QCV5hin7S+d5KcK6ClXPV79Qc3fFC6CZ/EhIOdnFJN+NakUvEPt 34O+1oWWE1zSxkEzaXZnN4y1m9SOYoArN3gbWPUpIy3rhiBNlYrZNeUcU6AxddzsGNnA cR37gGpE1VAWRYBa5+k8lprMncFu1EOxKza6fr+I5Egcqtvw+jtzXVSO9KpmBhq+mOoE YY5g== X-Received: by 10.194.94.167 with SMTP id dd7mr12093257wjb.43.1386160419220; Wed, 04 Dec 2013 04:33:39 -0800 (PST) Received: from [192.168.1.16] (85-188.196-178.cust.bluewin.ch. [178.196.188.85]) by mx.google.com with ESMTPSA id n6sm6584511wix.3.2013.12.04.04.33.37 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 04 Dec 2013 04:33:38 -0800 (PST) Message-ID: <529F211B.9010909@gmail.com> Date: Wed, 04 Dec 2013 13:33:31 +0100 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: The development of GNU GRUB Subject: Re: [PATCH 1/3] "-Wall -Wextra -Werror" compilation patches - part 1/3 References: <1386158288-32144-1-git-send-email-doront@mellanox.com> In-Reply-To: <1386158288-32144-1-git-send-email-doront@mellanox.com> X-Enigmail-Version: 1.5.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="----enig2ARRBPPBREJVGPJAKFBIT" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c03::22b X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 12:33:51 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2ARRBPPBREJVGPJAKFBIT Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 04.12.2013 12:58, Doron Tsur wrote: > Tests: Ubuntu 13.10 compilation > .../configure --prefix=3D/usr --enable-mm-debug --enable-cache-stats EF= I_ARCH=3Dx86_64 --with-platform=3Defi --enable-boot-time CFLAGS=3D"-Wall = -Wextra -Werror" && make All of your patches are for external projects (gnulib and libgcrypt). I suggect contacting them directly. We can backport patches from them but we don't usually have local patches for their trees. > Signed-off-by: Doron Tsur > --- > grub-core/gnulib/argp-fmtstream.c | 2 +- > grub-core/gnulib/argp-help.c | 6 +++--- > grub-core/gnulib/argp-parse.c | 4 ++-- > grub-core/gnulib/vasnprintf.c | 18 +++++++++++++----- > grub-core/lib/libgcrypt/cipher/rijndael.c | 3 ++- > 5 files changed, 21 insertions(+), 12 deletions(-) >=20 > diff --git a/grub-core/gnulib/argp-fmtstream.c b/grub-core/gnulib/argp-= fmtstream.c > index 02406ff..19fab18 100644 > --- a/grub-core/gnulib/argp-fmtstream.c > +++ b/grub-core/gnulib/argp-fmtstream.c > @@ -234,7 +234,7 @@ __argp_fmtstream_update (argp_fmtstream_t fs) > else > { > size_t display_width =3D mbsnwidth (buf, nl - buf, MBSW_STOP_AT_NUL= ); > - if (display_width < (ssize_t) fs->rmargin) > + if (display_width < (size_t) fs->rmargin) > { > /* The buffer contains a full line that fits within the maximum= > line width. Reset point and scan the next line. */ > diff --git a/grub-core/gnulib/argp-help.c b/grub-core/gnulib/argp-help.= c > index 2914f47..e01d40c 100644 > --- a/grub-core/gnulib/argp-help.c > +++ b/grub-core/gnulib/argp-help.c > @@ -599,8 +599,8 @@ hol_entry_long_iterate (const struct hol_entry *ent= ry, > =0C > /* Iterator that returns true for the first short option. */ > static int > -until_short (const struct argp_option *opt, const struct argp_option *= real, > - const char *domain, void *cookie) > +until_short (const struct argp_option *opt, const struct argp_option *= real __attribute__((unused)), > + const char *domain __attribute__((unused)), void *cookie = __attribute__((unused))) > { > return oshort (opt) ? opt->key : 0; > } > @@ -1269,7 +1269,7 @@ optional for any corresponding short options."); > static int > add_argless_short_opt (const struct argp_option *opt, > const struct argp_option *real, > - const char *domain, void *cookie) > + const char *domain __attribute__((unused)), voi= d *cookie) > { > char **snao_end =3D cookie; > if (!(opt->arg || real->arg) > diff --git a/grub-core/gnulib/argp-parse.c b/grub-core/gnulib/argp-pars= e.c > index 67ea32c..93cce25 100644 > --- a/grub-core/gnulib/argp-parse.c > +++ b/grub-core/gnulib/argp-parse.c > @@ -144,7 +144,7 @@ static const struct argp_option argp_version_option= s[] =3D > }; > =20 > static error_t > -argp_version_parser (int key, char *arg, struct argp_state *state) > +argp_version_parser (int key, char *arg __attribute__((unused)), struc= t argp_state *state) > { > switch (key) > { > @@ -714,7 +714,7 @@ parser_parse_arg (struct parser *parser, char *val)= > /* Call the user parsers to parse the option OPT, with argument VAL, a= t the > current position, returning any error. */ > static error_t > -parser_parse_opt (struct parser *parser, int opt, char *val) > +parser_parse_opt (struct parser *parser, int opt, char *val __attribut= e__((unused))) > { > /* The group key encoded in the high bits; 0 for short opts or > group_number + 1 for long opts. */ > diff --git a/grub-core/gnulib/vasnprintf.c b/grub-core/gnulib/vasnprint= f.c > index 8fdab32..f636389 100644 > --- a/grub-core/gnulib/vasnprintf.c > +++ b/grub-core/gnulib/vasnprintf.c > @@ -1532,7 +1532,7 @@ is_borderline (const char *digits, size_t precisi= on) > of sprintf or SNPRINTF of a single conversion directive. */ > static size_t > MAX_ROOM_NEEDED (const arguments *ap, size_t arg_index, FCHAR_T conver= sion, > - arg_type type, int flags, size_t width, int has_preci= sion, > + arg_type type, int flags __attribute__((unused)), siz= e_t width, int has_precision, > size_t precision, int pad_ourselves) > { > size_t tmp_length; > @@ -2693,7 +2693,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, > errno =3D EILSEQ; > return NULL; > } > - if (precision < count) > + if (precision < (size_t)count) > break; > arg_end++; > characters +=3D count; > @@ -4606,13 +4606,17 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp= , > arg_type type =3D a.arg[dp->arg_index].type; > int flags =3D dp->flags; > #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || E= NABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||= NEED_PRINTF_UNBOUNDED_PRECISION > - int has_width; > size_t width; > #endif > #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || NEED_PRINTF_UNBOUNDE= D_PRECISION > int has_precision; > size_t precision; > #endif > +#if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || E= NABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||= NEED_PRINTF_UNBOUNDED_PRECISION > +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST = || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION > + int has_width; > +#endif > +#endif > #if NEED_PRINTF_UNBOUNDED_PRECISION > int prec_ourselves; > #else > @@ -4636,7 +4640,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, > #endif > =20 > #if !USE_SNPRINTF || !HAVE_SNPRINTF_RETVAL_C99 || !DCHAR_IS_TCHAR || E= NABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||= NEED_PRINTF_UNBOUNDED_PRECISION > +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST = || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION > has_width =3D 0; > +#endif > width =3D 0; > if (dp->width_start !=3D dp->width_end) > { > @@ -4665,7 +4671,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, > width =3D xsum (xtimes (width, 10), *digitp+= + - '0'); > while (digitp !=3D dp->width_end); > } > +#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST = || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION > has_width =3D 1; > +#endif > } > #endif > =20 > @@ -5306,7 +5314,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, > #endif > =20 > #if !USE_SNPRINTF > - if (count >=3D tmp_length) > + if ((size_t)count >=3D tmp_length) > /* tmp_length was incorrectly calculated - fix t= he > code above! */ > abort (); > @@ -5397,7 +5405,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp, > =20 > #if DCHAR_IS_TCHAR && !USE_SNPRINTF > /* Make room for the result. */ > - if (count > allocated - length) > + if ((size_t)count > allocated - length) > { > /* Need at least count elements. But allocate= > proportionally. */ > diff --git a/grub-core/lib/libgcrypt/cipher/rijndael.c b/grub-core/lib/= libgcrypt/cipher/rijndael.c > index 4e8eb3a..b79f0ce 100644 > --- a/grub-core/lib/libgcrypt/cipher/rijndael.c > +++ b/grub-core/lib/libgcrypt/cipher/rijndael.c > @@ -181,7 +181,8 @@ do_setkey (RIJNDAEL_context *ctx, const byte *key, = const unsigned keylen) > static int initialized =3D 0; > static const char *selftest_failed=3D0; > int rounds; > - int i,j, r, t, rconpointer =3D 0; > + int j, r, t, rconpointer =3D 0; > + unsigned i =3D 0; > int KC; > union > { >=20 ------enig2ARRBPPBREJVGPJAKFBIT Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Using GnuPG with Icedove - http://www.enigmail.net/ iF4EAREKAAYFAlKfISEACgkQmBXlbbo5nOuIJAD6AwUt2lzgLhG1zXafZMOjfWp5 mo4zO2QS2Ynb/Iqw/YwA/1VOoodgb71JBWIidU6U3qouHVOyHs8NYA9jcR0Oh+5i =9a7y -----END PGP SIGNATURE----- ------enig2ARRBPPBREJVGPJAKFBIT--