diff options
author | Tom Tromey <tromey@adacore.com> | 2025-03-20 08:13:57 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2025-04-24 13:25:08 -0600 |
commit | 2b6e074017c8a08c750af3b6ab1e10eeb70153a2 (patch) | |
tree | 5f13cba6dcc6a070f0713bec9fa41e2d628344ee /gdb/testsuite/gdb.base/dprintf-execution-x-script.c | |
parent | cdcd13791f7de81f80ab12f5426fe002430f38b6 (diff) | |
download | binutils-2b6e074017c8a08c750af3b6ab1e10eeb70153a2.zip binutils-2b6e074017c8a08c750af3b6ab1e10eeb70153a2.tar.gz binutils-2b6e074017c8a08c750af3b6ab1e10eeb70153a2.tar.bz2 |
Remove dead code from dwarf2_const_value_data
dwarf2_const_value_data checks the size of the data like so:
if (bits < sizeof (*value) * 8)
...
else if (bits == sizeof (*value) * 8)
...
else
...
However, 'bits' can only be 8, 16, 32, or 64. And, because 'value' is
a LONGEST, which is alwasy 64-bit, the final 'else' can never be
taken.
This patch removes the dead code. And, because this was the only
reason for a non-void return value, the return type is changed as
well.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32680
Diffstat (limited to 'gdb/testsuite/gdb.base/dprintf-execution-x-script.c')
0 files changed, 0 insertions, 0 deletions