GNU bug report logs - #23825
maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstrict-overflow

Previous Next

Package: coreutils;

Reported by: Jim Meyering <jim <at> meyering.net>

Date: Wed, 22 Jun 2016 14:38:02 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: 23825 <at> debbugs.gnu.org
Subject: bug#23825: maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstrict-overflow
Date: Wed, 22 Jun 2016 07:37:07 -0700
[Message part 1 (text/plain, inline)]
Building with a recent gcc-7 failed, so I wrote the attached patch. I
think we'll never have 2^31 command line arguments, so "unsigned int"
will ll be ok:

    maint: avoid md5sum.c warning from bleeding-edge gcc's -Wstrict-overflow

    Avoid this warning/error from gcc:
      src/md5sum.c:870:3: error: assuming signed overflow does not occur \
      when simplifying conditional to constant [-Werror=strict-overflow]
    * src/md5sum.c (main): Use an unsigned variable as the loop index,
    rather than optind.
[0001-maint-avoid-md5sum.c-warning-from-bleeding-edge-gcc-.patch (text/x-patch, attachment)]

This bug report was last modified 6 years and 271 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.