On 7/13/21 9:06 AM, Eric Blake wrote:
e->dev = g_strdup(fields[3]);
e->dev now contains malloc'd memory...
-errors += qemu_strtou64(fields[4], NULL, 10, &e->inode);
+errors |= qemu_strtou64(fields[4], NULL, 10, &e->inode);
...and if this qem
On Mon, Jul 12, 2021 at 02:55:27PM -0700, Richard Henderson wrote:
> From clang-13:
> util/selfmap.c:26:21: error: variable 'errors' set but not used \
> [-Werror,-Wunused-but-set-variable]
>
> Quite right of course, but there's no reason not to check errors.
>
> First, incrementing errors is
>From clang-13:
util/selfmap.c:26:21: error: variable 'errors' set but not used \
[-Werror,-Wunused-but-set-variable]
Quite right of course, but there's no reason not to check errors.
First, incrementing errors is incorrect, because qemu_strtoul
returns an errno not a count -- just or them to