mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-06 22:30:14 +01:00
dix: SetFontPath: don't set errorValue on Success
Clears warning from gcc 14.1:
../dix/dixfonts.c: In function ‘SetFontPath’:
../dix/dixfonts.c:1697:28: warning: use of uninitialized value ‘bad’
[CWE-457] [-Wanalyzer-use-of-uninitialized-value]
1697 | client->errorValue = bad;
| ~~~~~~~~~~~~~~~~~~~^~~~~
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
(cherry picked from commit 1a86fba0d9)
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1702>
This commit is contained in:
parent
2f1ea65b6d
commit
013311852d
1 changed files with 2 additions and 1 deletions
|
|
@ -1687,7 +1687,8 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths)
|
|||
int bad;
|
||||
|
||||
err = SetFontPathElements(npaths, paths, &bad, FALSE);
|
||||
client->errorValue = bad;
|
||||
if (err != Success)
|
||||
client->errorValue = bad;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue