bd1386cce1
It's already confusing that we have two very similar functions for wrapping the parse of a 64-bit unsigned value, differing mainly on whether they permit leading '-'. Adjust the signature of parse_uint() and parse_uint_full() to be like all of qemu_strto*(): put the result parameter last, use the same types (uint64_t and unsigned long long have the same width, but are not always the same type), and mark endptr const (this latter change only affects the rare caller of parse_uint). Adjust all callers in the tree. While at it, note that since cutils.c already includes: QEMU_BUILD_BUG_ON(sizeof(int64_t) != sizeof(long long)); we are guaranteed that the result of parse_uint* cannot exceed UINT64_MAX (or the build would have failed), so we can drop pre-existing dead comparisons in opts-visitor.c that were never false. Reviewed-by: Hanna Czenczek <hreitz@redhat.com> Message-Id: <20230522190441.64278-8-eblake@redhat.com> [eblake: Drop dead code spotted by Markus] Signed-off-by: Eric Blake <eblake@redhat.com> |
||
---|---|---|
.. | ||
icons | ||
shader | ||
clipboard.c | ||
cocoa.m | ||
console-gl.c | ||
console.c | ||
curses_keys.h | ||
curses.c | ||
cursor_hidden.xpm | ||
cursor_left_ptr.xpm | ||
cursor.c | ||
dbus-chardev.c | ||
dbus-clipboard.c | ||
dbus-console.c | ||
dbus-display1.xml | ||
dbus-error.c | ||
dbus-listener.c | ||
dbus-module.c | ||
dbus.c | ||
dbus.h | ||
egl-context.c | ||
egl-headless.c | ||
egl-helpers.c | ||
gtk-clipboard.c | ||
gtk-egl.c | ||
gtk-gl-area.c | ||
gtk.c | ||
input-barrier.c | ||
input-barrier.h | ||
input-keymap.c | ||
input-legacy.c | ||
input-linux.c | ||
input.c | ||
kbd-state.c | ||
keymaps.c | ||
keymaps.h | ||
meson.build | ||
qemu-pixman.c | ||
qemu-x509.h | ||
qemu.desktop | ||
sdl2-2d.c | ||
sdl2-gl.c | ||
sdl2-input.c | ||
sdl2.c | ||
shader.c | ||
spice-app.c | ||
spice-core.c | ||
spice-display.c | ||
spice-input.c | ||
spice-module.c | ||
trace-events | ||
trace.h | ||
udmabuf.c | ||
ui-hmp-cmds.c | ||
ui-qmp-cmds.c | ||
util.c | ||
vdagent.c | ||
vgafont.h | ||
vnc_keysym.h | ||
vnc-auth-sasl.c | ||
vnc-auth-sasl.h | ||
vnc-auth-vencrypt.c | ||
vnc-auth-vencrypt.h | ||
vnc-clipboard.c | ||
vnc-enc-hextile-template.h | ||
vnc-enc-hextile.c | ||
vnc-enc-tight.c | ||
vnc-enc-tight.h | ||
vnc-enc-zlib.c | ||
vnc-enc-zrle.c | ||
vnc-enc-zrle.c.inc | ||
vnc-enc-zrle.h | ||
vnc-enc-zywrle-template.c | ||
vnc-enc-zywrle.h | ||
vnc-jobs.c | ||
vnc-jobs.h | ||
vnc-palette.c | ||
vnc-palette.h | ||
vnc-stubs.c | ||
vnc-ws.c | ||
vnc-ws.h | ||
vnc.c | ||
vnc.h | ||
win32-kbd-hook.c | ||
x_keymap.c | ||
x_keymap.h |