[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Compilations warnings-as-errors when building from git
From: |
Assaf Gordon |
Subject: |
Compilations warnings-as-errors when building from git |
Date: |
Thu, 13 Jan 2022 23:22:16 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
Hi all,
I'm getting few warnings-as-errors when building the latest version from
git (using Debian 10 amd64 with gcc 8.3.0).
I can send a patch for the "malloc" one, but not sure about the
intricates of intprops.h .
- assaf
----
lib/randperm.c: In function 'sparse_new':
lib/randperm.c:111:1: error: function might be candidate for attribute
'malloc' if it is known to return normally
[-Werror=suggest-attribute=malloc]
sparse_new (size_t size_hint)
^~~~~~~~~~
----
src/stat.c: In function 'default_format':
src/stat.c:1653:1: error: function might be candidate for attribute
'malloc' if it is known to return normally
[-Werror=suggest-attribute=malloc]
default_format (bool fs, bool terse, bool device)
^~~~~~~~~~~~~~
cc1: all warnings being treated as errors
----
( This failure is in pinky.c and the same in csplit.c )
In file included from ./lib/xalloc.h:27,
from src/system.h:244,
from src/pinky.c:25:
src/pinky.c: In function 'create_fullname':
./lib/intprops.h:44:55: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
^
./lib/intprops.h:407:42: note: in expansion of macro 'EXPR_SIGNED'
((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) &&
EXPR_SIGNED (b) \
^~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:44:55: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
^
./lib/intprops.h:407:61: note: in expansion of macro 'EXPR_SIGNED'
((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && EXPR_SIGNED (a) &&
EXPR_SIGNED (b) \
^~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:588:8: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
((b) < 0 \
^
./lib/intprops.h:408:10: note: in expansion of macro
'_GL_INT_MULTIPLY_RANGE_OVERFLOW'
&& _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r)))
-1)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:589:11: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
? ((a) < 0 \
^
./lib/intprops.h:408:10: note: in expansion of macro
'_GL_INT_MULTIPLY_RANGE_OVERFLOW'
&& _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r)))
-1)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:44:55: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
^
./lib/intprops.h:590:10: note: in expansion of macro 'EXPR_SIGNED'
? (EXPR_SIGNED (_GL_INT_CONVERT (tmax, b)) \
^~~~~~~~~~~
./lib/intprops.h:408:10: note: in expansion of macro
'_GL_INT_MULTIPLY_RANGE_OVERFLOW'
&& _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r)))
-1)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:44:55: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
^
./lib/intprops.h:597:10: note: in expansion of macro 'EXPR_SIGNED'
? (EXPR_SIGNED (a) \
^~~~~~~~~~~
./lib/intprops.h:408:10: note: in expansion of macro
'_GL_INT_MULTIPLY_RANGE_OVERFLOW'
&& _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r)))
-1)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:603:11: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
: ((a) < 0 \
^
./lib/intprops.h:408:10: note: in expansion of macro
'_GL_INT_MULTIPLY_RANGE_OVERFLOW'
&& _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r)))
-1)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
./lib/intprops.h:44:55: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
#define EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
^
./lib/intprops.h:605:13: note: in expansion of macro 'EXPR_SIGNED'
? (EXPR_SIGNED (b) ? 0 < (b) + (tmin) : -1 - (tmin) < (b) - 1) \
^~~~~~~~~~~
./lib/intprops.h:408:10: note: in expansion of macro
'_GL_INT_MULTIPLY_RANGE_OVERFLOW'
&& _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r)))
-1)) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/pinky.c:115:11: note: in expansion of macro 'INT_MULTIPLY_WRAPV'
if (INT_MULTIPLY_WRAPV (ulen, ampersands - 1, &product)
^~~~~~~~~~~~~~~~~~
----
- Compilations warnings-as-errors when building from git,
Assaf Gordon <=