[Bug 211305] devel/gdb: (CORE_ADDR) 0 missing * in cast in tui/tui-stack.c
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Jul 31 23:07:56 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211305
--- Comment #5 from Mark Millard <markmi at dsl-only.net> ---
(In reply to luca.pizzamiglio from comment #4)
What is reported follows. ILP32 (such as armv6) has some long vs. long long
issues (truncation) that do not show up for LP64 (such as amd64). Otherwise
they agree.
amd64:
(I've tried to skip "checking . . ." warnings.)
(I've also skipped things like format strings that are not literals.)
(Otherwise the amd64 and armv6 lists are complete unless I messed up.)
cc -c -DHAVE_CONFIG_H -pipe -DRL_NO_COMPAT -Wno-unused-function
-Wno-unused-variable -Wno-extended-offsetof -DLIBICONV_PLUG -g
-fstack-protector -fno-strict-aliasing -std=gnu89 -DLIBICONV_PLUG
-I/usr/local/include -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat
-Wstrict-prototypes -pedantic -D_GNU_SOURCE ./stack-limit.c -o stack-limit.o
./stack-limit.c:54:24: warning: comparison of integers of different signs:
'rlim_t' (aka 'long') and 'unsigned long' [-Wsign-compare]
&& rlim.rlim_cur < pref
~~~~~~~~~~~~~ ^ ~~~~
. . .
msp430-tdep.c:401:24: warning: comparison of constant 16 with expression of
type 'MSP430_Size' is always false
[-Wtautological-constant-out-of-range-compare]
int size = opc.size == 16 ? 2 : 4;
~~~~~~~~ ^ ~~
. . .
score-tdep.c:819:12: warning: comparison of unsigned expression < 0 is always
false [-Wtautological-compare]
if (size < 0)
~~~~ ^ ~
. . .
sh64-tdep.c:977:42: warning: comparison of unsigned expression >= 0 is always
true [-Wtautological-compare]
if (cache->saved_regs[MEDIA_FP_REGNUM] >= 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
. . .
xcoffread.c:1027:41: warning:variable 'main_aux' is uninitialized when used
here [-Wuninitialized]
union internal_auxent fcn_aux_saved = main_aux;
^~~~~~~~
xcoffread.c:1013:3: note: variable 'main_aux' is declared here
union internal_auxent main_aux;
^
. . .
./nat/x86-dregs.c:209:7: warning: variable 'i' is incremented both in the loop
header and in the loop body [-Wfor-loop-analysis]
i++;
^
./nat/x86-dregs.c:199:32: note: incremented here
ALL_DEBUG_ADDRESS_REGISTERS (i)
^
. . .
dtrace-probe.c:424:52: warning: while loop has empty body [-Wempty-body]
while (*p++ != '\0' && p - strtab < strtab_size);
^
dtrace-probe.c:424:52: note: put the semicolon on a separate line to silence
this warning
. . .
mmain.c:229:56: warning: adding 'int' to a string does not append to the string
[-Wstring-plus-int]
char *tmp_sys_gdbinit = xstrdup (SYSTEM_GDBINIT + datadir_len);
~~~~~~~~~~~~~~~^~~~~~~~~~~~~
main.c:229:56: note: use array indexing to silence this warning
char *tmp_sys_gdbinit = xstrdup (SYSTEM_GDBINIT + datadir_len);
^
& [ ]
. . .
ada-lang.c:2489:50: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
unpacked[unpacked_idx] = accum & ~(~0L << HOST_CHAR_BIT);
~~~ ^
ada-lang.c:2503:46: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]ESC[0m
unpacked[unpacked_idx] = accum & ~(~0L << HOST_CHAR_BIT);
~~~ ^
armv6: (other than long vs. long long issues it duplicates the above)
elf32-arm.c:10901:31: warning: absolute value function 'labs' given an argument
of type 'bfd_signed_vma' (aka 'long long') but has parameter of type 'long'
whic
h may cause truncation of value [-Wabsolute-value]
(long) rel->r_offset, labs (signed_value), howto->name);
^
elf32-arm.c:10901:31: note: use function 'llabs' instead
(long) rel->r_offset, labs (signed_value), howto->name);
^~~~
llabs
elf32-arm.c:10986:31: warning: absolute value function 'labs' given an argument
of type 'bfd_signed_vma' (aka 'long long') but has parameter of type 'long'
which may cause truncation of value [-Wabsolute-value]
(long) rel->r_offset, labs (signed_value), howto->name);
^
elf32-arm.c:10986:31: note: use function 'llabs' instead
(long) rel->r_offset, labs (signed_value), howto->name);
^~~~
llabs
elf32-arm.c:11073:30: warning: absolute value function 'labs' given an argument
of type 'bfd_signed_vma' (aka 'long long') but has parameter of type 'long'
which may cause truncation of value [-Wabsolute-value]
(long) rel->r_offset, labs (signed_value), howto->name);
^
elf32-arm.c:11073:30: note: use function 'llabs' instead
(long) rel->r_offset, labs (signed_value), howto->name);
^~~~
llabs
. . .
msp430-tdep.c:401:24: warning: comparison of constant 16 with expression of
type 'MSP430_Size' is always false
[-Wtautological-constant-out-of-range-compare]
int size = opc.size == 16 ? 2 : 4;
~~~~~~~~ ^ ~~
. . .
score-tdep.c:819:12: warning: comparison of unsigned expression < 0 is always
false [-Wtautological-compare]
if (size < 0)
~~~~ ^ ~
sh64-tdep.c:977:42: warning: comparison of unsigned expression >= 0 is always
true [-Wtautological-compare]
if (cache->saved_regs[MEDIA_FP_REGNUM] >= 0)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
. . .
xcoffread.c:1027:41: warning: variable 'main_aux' is uninitialized when used
here [-Wuninitialized]
union internal_auxent fcn_aux_saved = main_aux;
^~~~~~~~
xcoffread.c:1013:3: note: variable 'main_aux' is declared here
union internal_auxent main_aux;
^
. . .
dtrace-probe.c:424:52: warning: while loop has empty body [-Wempty-body]
while (*p++ != '\0' && p - strtab < strtab_size);
^
dtrace-probe.c:424:52: note: put the semicolon on a separate line to silence
this warning
. . .
main.c:229:56: warning: adding 'int' to a string does not append to the string
[-Wstring-plus-int]
char *tmp_sys_gdbinit = xstrdup (SYSTEM_GDBINIT + datadir_len);
~~~~~~~~~~~~~~~^~~~~~~~~~~~~
main.c:229:56: note: use array indexing to silence this warning
char *tmp_sys_gdbinit = xstrdup (SYSTEM_GDBINIT + datadir_len);
^
& [ ]
. . .
ada-lang.c:2489:50: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
unpacked[unpacked_idx] = accum & ~(~0L << HOST_CHAR_BIT);
~~~ ^
ada-lang.c:2503:46: warning: shifting a negative signed value is undefined
[-Wshift-negative-value]
unpacked[unpacked_idx] = accum & ~(~0L << HOST_CHAR_BIT);
~~~ ^
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list