diff options
author | Tom Tromey <tromey@adacore.com> | 2023-04-21 07:05:53 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2023-04-21 09:06:03 -0600 |
commit | da9a978aae78e2c1e35ccdf683474847e4465e5f (patch) | |
tree | 2de5193d6da7ce87dd37efbf818ccd345f4cef7e /gdb/doc | |
parent | fbdecfbf285234cd4eba0e7daf480c63b2d65eb3 (diff) | |
download | gdb-da9a978aae78e2c1e35ccdf683474847e4465e5f.zip gdb-da9a978aae78e2c1e35ccdf683474847e4465e5f.tar.gz gdb-da9a978aae78e2c1e35ccdf683474847e4465e5f.tar.bz2 |
Fix -Wmaybe-uninitialized warning in opcodes/i386-dis.c
A recent change in opcodes/i386-dis.c caused a build failure on my
x86-64 Fedora 36 system, which uses:
$ gcc --version
gcc (GCC) 12.2.1 20221121 (Red Hat 12.2.1-4)
[...]
The error is:
../../binutils-gdb/opcodes/i386-dis.c: In function ‘OP_J’:
../../binutils-gdb/opcodes/i386-dis.c:12705:22: error: ‘val’ may be used uninitialized [-Werror=maybe-uninitialized]
12705 | disp = val & 0x8000 ? val - 0x10000 : val;
| ~~~~^~~~~~~~
This patch fixes the warning.
opcodes/ChangeLog
2023-04-21 Tom Tromey <tromey@adacore.com>
* i386-dis.c (OP_J): Check result of get16.
Diffstat (limited to 'gdb/doc')
0 files changed, 0 insertions, 0 deletions