diff options
| author | Paul Eggert | 2025-04-19 19:21:15 -0700 |
|---|---|---|
| committer | Paul Eggert | 2025-04-19 19:31:26 -0700 |
| commit | 67ae1790088616777b352acffc63aeeb7ee50cb6 (patch) | |
| tree | c46707177c2b60fbe0954d2055c3571bbba3f433 /src | |
| parent | c8eed90eb4d0583dc3463edfad176b9d3f98d11f (diff) | |
| download | emacs-67ae1790088616777b352acffc63aeeb7ee50cb6.tar.gz emacs-67ae1790088616777b352acffc63aeeb7ee50cb6.zip | |
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).
Diffstat (limited to 'src')
| -rw-r--r-- | src/emacs.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c index 79604d09a37..cf8f4bd63f7 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -808,6 +808,8 @@ find_emacs_executable (char const *argv0, ptrdiff_t *candidate_size) | |||
| 808 | candidate = xpalloc (NULL, candidate_size, | 808 | candidate = xpalloc (NULL, candidate_size, |
| 809 | needed - *candidate_size + 1, -1, 1); | 809 | needed - *candidate_size + 1, -1, 1); |
| 810 | } | 810 | } |
| 811 | else | ||
| 812 | eassume (candidate); | ||
| 811 | memcpy (candidate + 0, path_part, path_part_length); | 813 | memcpy (candidate + 0, path_part, path_part_length); |
| 812 | candidate[path_part_length] = DIRECTORY_SEP; | 814 | candidate[path_part_length] = DIRECTORY_SEP; |
| 813 | memcpy (candidate + path_part_length + 1, argv0, argv0_length + 1); | 815 | memcpy (candidate + path_part_length + 1, argv0, argv0_length + 1); |