Pacify GCC 15 -Wanalyzer-null-dereference
* src/emacs.c (find_emacs_executable): Add an eassume. This pacifies -Wanalyzer-null-dereference with gcc (GCC) 15.0.1 20250329 (Red Hat 15.0.1-0).
This commit is contained in:
parent
c8eed90eb4
commit
67ae179008
1 changed files with 2 additions and 0 deletions
|
@ -808,6 +808,8 @@ find_emacs_executable (char const *argv0, ptrdiff_t *candidate_size)
|
|||
candidate = xpalloc (NULL, candidate_size,
|
||||
needed - *candidate_size + 1, -1, 1);
|
||||
}
|
||||
else
|
||||
eassume (candidate);
|
||||
memcpy (candidate + 0, path_part, path_part_length);
|
||||
candidate[path_part_length] = DIRECTORY_SEP;
|
||||
memcpy (candidate + path_part_length + 1, argv0, argv0_length + 1);
|
||||
|
|
Loading…
Add table
Reference in a new issue