Date: Sun, 31 Jul 2016 23:07:55 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-ports-bugs@FreeBSD.org Subject: [Bug 211305] devel/gdb: (CORE_ADDR) 0 missing * in cast in tui/tui-stack.c Message-ID: <bug-211305-13-hbyFN6Yb76@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-211305-13@https.bugs.freebsd.org/bugzilla/> References: <bug-211305-13@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D211305 --- Comment #5 from Mark Millard <markmi@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=3Dgnu89 -DLIBICONV_PLUG -I/usr/local/include -I. -I./../include -W -Wall -Wwrite-strings -Wc++-com= pat -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 =3D opc.size =3D=3D 16 ? 2 : 4; ~~~~~~~~ ^ ~~ . . . score-tdep.c:819:12: warning: comparison of unsigned expression < 0 is alwa= ys false [-Wtautological-compare] if (size < 0) ~~~~ ^ ~ . . . sh64-tdep.c:977:42: warning: comparison of unsigned expression >=3D 0 is al= ways true [-Wtautological-compare] if (cache->saved_regs[MEDIA_FP_REGNUM] >=3D 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ . . . xcoffread.c:1027:41: warning:variable 'main_aux' is uninitialized when used here [-Wuninitialized] union internal_auxent fcn_aux_saved =3D 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 l= oop 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++ !=3D '\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 st= ring [-Wstring-plus-int] char *tmp_sys_gdbinit =3D xstrdup (SYSTEM_GDBINIT + datadir_l= en); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~ main.c:229:56: note: use array indexing to silence this warning char *tmp_sys_gdbinit =3D xstrdup (SYSTEM_GDBINIT + datadir_l= en); ^ & [ ] . . . ada-lang.c:2489:50: warning: shifting a negative signed value is undefined [-Wshift-negative-value] unpacked[unpacked_idx] =3D 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] =3D 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 argu= ment 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 argu= ment 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 argu= ment 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 =3D opc.size =3D=3D 16 ? 2 : 4; ~~~~~~~~ ^ ~~ . . . score-tdep.c:819:12: warning: comparison of unsigned expression < 0 is alwa= ys false [-Wtautological-compare] if (size < 0) ~~~~ ^ ~ sh64-tdep.c:977:42: warning: comparison of unsigned expression >=3D 0 is al= ways true [-Wtautological-compare] if (cache->saved_regs[MEDIA_FP_REGNUM] >=3D 0) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~ . . . xcoffread.c:1027:41: warning: variable 'main_aux' is uninitialized when used here [-Wuninitialized] union internal_auxent fcn_aux_saved =3D 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++ !=3D '\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 str= ing [-Wstring-plus-int] char *tmp_sys_gdbinit =3D xstrdup (SYSTEM_GDBINIT + datadir_l= en); ~~~~~~~~~~~~~~~^~~~~~~~~~~~~ main.c:229:56: note: use array indexing to silence this warning char *tmp_sys_gdbinit =3D xstrdup (SYSTEM_GDBINIT + datadir_l= en); ^ & [ ] . . . ada-lang.c:2489:50: warning: shifting a negative signed value is undefined [-Wshift-negative-value] unpacked[unpacked_idx] =3D accum & ~(~0L << HOST_CHAR_BIT); ~~~ ^ ada-lang.c:2503:46: warning: shifting a negative signed value is undefined [-Wshift-negative-value] unpacked[unpacked_idx] =3D accum & ~(~0L << HOST_CHAR_BIT); ~~~ ^ --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-211305-13-hbyFN6Yb76>