diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-12-19 09:36:00 +0100 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-12-19 09:36:00 +0100 |
commit | f8b6a781fb6b7e799c95c1c2be87accc39c0b7c0 (patch) | |
tree | fec48c3ec9f248c2dfc093c78469edde3eb7ea2e /gprofng/testsuite | |
parent | 08b50e1e03b27950730f3136eb311962d0deec14 (diff) | |
download | gdb-f8b6a781fb6b7e799c95c1c2be87accc39c0b7c0.zip gdb-f8b6a781fb6b7e799c95c1c2be87accc39c0b7c0.tar.gz gdb-f8b6a781fb6b7e799c95c1c2be87accc39c0b7c0.tar.bz2 |
gprofng/testsuite: eliminate bogus casts
Casting pointers to unsigned int is generally problematic and hence
compilers tend to warn about such. While here they're used only in
fprintf(), it still seems better to omit such casts, even if only to
avoid setting bad precedents.
Diffstat (limited to 'gprofng/testsuite')
-rw-r--r-- | gprofng/testsuite/gprofng.display/synprog/so_syn.c | 2 | ||||
-rw-r--r-- | gprofng/testsuite/gprofng.display/synprog/so_syx.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/gprofng/testsuite/gprofng.display/synprog/so_syn.c b/gprofng/testsuite/gprofng.display/synprog/so_syn.c index 6fc5aa6..d6c9331 100644 --- a/gprofng/testsuite/gprofng.display/synprog/so_syn.c +++ b/gprofng/testsuite/gprofng.display/synprog/so_syn.c @@ -32,7 +32,7 @@ so_cputime () /* put a memory leak in here */ (void) malloc (13); - fprintf (stderr, "so_burncpu @ 0x%08x\n", (unsigned int) so_burncpu); + fprintf (stderr, "so_burncpu @ %p\n", so_burncpu); so_burncpu (); wlog ("end of so_cputime", NULL); diff --git a/gprofng/testsuite/gprofng.display/synprog/so_syx.c b/gprofng/testsuite/gprofng.display/synprog/so_syx.c index ae7da6f..1994a0a 100644 --- a/gprofng/testsuite/gprofng.display/synprog/so_syx.c +++ b/gprofng/testsuite/gprofng.display/synprog/so_syx.c @@ -32,7 +32,7 @@ sx_cputime () /* put a memory leak in here */ (void) malloc (13); - fprintf (stderr, "sx_burncpu @ 0x%08x\n", (unsigned int) sx_burncpu); + fprintf (stderr, "sx_burncpu @ %p\n", sx_burncpu); sx_burncpu (); wlog ("end of sx_cputime", NULL); return 13; |