projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
13dac6f
)
Pacify GCC 12 in xrdb.c
author
Paul Eggert
<eggert@cs.ucla.edu>
Tue, 31 May 2022 08:19:32 +0000
(
01:19
-0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Tue, 31 May 2022 08:26:47 +0000
(
01:26
-0700)
* src/xrdb.c (x_get_resource): Simply assign the return value.
This pacifies GCC 12 -Wanalyzer-use-of-uninitialized-value.
src/xrdb.c
patch
|
blob
|
history
diff --git
a/src/xrdb.c
b/src/xrdb.c
index aa79d719c8c71377e83a1e719cf61272922403b2..faeea04a53993544a9e68cce0b1a01774b0571b7 100644
(file)
--- a/
src/xrdb.c
+++ b/
src/xrdb.c
@@
-486,11
+486,7
@@
x_get_resource (XrmDatabase rdb, const char *name, const char *class,
if (XrmQGetResource (rdb, namelist, classlist, &type, &value) == True
&& (type == expected_type))
{
- if (type == x_rm_string)
- ret_value->addr = (char *) value.addr;
- else
- memcpy (ret_value->addr, value.addr, ret_value->size);
-
+ *ret_value = value;
return value.size;
}