mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-17 19:20:30 +01:00
freedreno/afuc: Fix potentially uninitialized variable
../src/freedreno/afuc/emu-ui.c:64:11: warning: ‘p’ may be used uninitialized [-Wmaybe-uninitialized]
64 | while (*p && isspace(*p))
| ^~
../src/freedreno/afuc/emu-ui.c: In function ‘emu_packet_prompt’:
../src/freedreno/afuc/emu-ui.c:459:10: note: ‘p’ was declared here
459 | char *p;
| ^
Signed-off-by: Karmjit Mahil <karmjit.mahil@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38104>
This commit is contained in:
parent
cf49571c9e
commit
7f2c53200f
1 changed files with 3 additions and 1 deletions
|
|
@ -88,8 +88,10 @@ readline(char **p)
|
|||
static size_t n;
|
||||
|
||||
ssize_t ret = getline(&buf, &n, stdin);
|
||||
if (ret < 0)
|
||||
if (ret < 0) {
|
||||
*p = NULL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
*p = buf;
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue