diff options
| author | Paul Eggert | 2019-05-30 15:06:39 -0700 |
|---|---|---|
| committer | Paul Eggert | 2019-05-30 15:29:50 -0700 |
| commit | 4b24b0185d910d756e85ecdc30f49c414577050e (patch) | |
| tree | 57fbd093fe75f0bdf75960a9030dded3c35ca3f0 /src/gmalloc.c | |
| parent | 7871c3dc9f38a32e1658a3579069a988b0d99623 (diff) | |
| download | emacs-4b24b0185d910d756e85ecdc30f49c414577050e.tar.gz emacs-4b24b0185d910d756e85ecdc30f49c414577050e.zip | |
Pacify GCC 9 -Wredundant-decls
* src/gmalloc.c (_fraghead) [!HYBRID_MALLOC]:
Make it static in this case, too. This avoids having both
‘extern struct list _fraghead[];’ and
‘static struct list _fraghead[BLOCKLOG];’, which
GCC 9 complains about.
Diffstat (limited to 'src/gmalloc.c')
| -rw-r--r-- | src/gmalloc.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/gmalloc.c b/src/gmalloc.c index f3b3d77aac9..9284d9bd606 100644 --- a/src/gmalloc.c +++ b/src/gmalloc.c | |||
| @@ -182,7 +182,7 @@ struct list | |||
| 182 | }; | 182 | }; |
| 183 | 183 | ||
| 184 | /* Free list headers for each fragment size. */ | 184 | /* Free list headers for each fragment size. */ |
| 185 | extern struct list _fraghead[]; | 185 | static struct list _fraghead[BLOCKLOG]; |
| 186 | 186 | ||
| 187 | /* List of blocks allocated with aligned_alloc and friends. */ | 187 | /* List of blocks allocated with aligned_alloc and friends. */ |
| 188 | struct alignlist | 188 | struct alignlist |
| @@ -339,9 +339,6 @@ size_t _heapindex; | |||
| 339 | /* Limit of valid info table indices. */ | 339 | /* Limit of valid info table indices. */ |
| 340 | size_t _heaplimit; | 340 | size_t _heaplimit; |
| 341 | 341 | ||
| 342 | /* Free lists for each fragment size. */ | ||
| 343 | struct list _fraghead[BLOCKLOG]; | ||
| 344 | |||
| 345 | /* Instrumentation. */ | 342 | /* Instrumentation. */ |
| 346 | size_t _chunks_used; | 343 | size_t _chunks_used; |
| 347 | size_t _bytes_used; | 344 | size_t _bytes_used; |
| @@ -351,10 +348,6 @@ size_t _bytes_free; | |||
| 351 | /* Are you experienced? */ | 348 | /* Are you experienced? */ |
| 352 | int __malloc_initialized; | 349 | int __malloc_initialized; |
| 353 | 350 | ||
| 354 | #else | ||
| 355 | |||
| 356 | static struct list _fraghead[BLOCKLOG]; | ||
| 357 | |||
| 358 | #endif /* HYBRID_MALLOC */ | 351 | #endif /* HYBRID_MALLOC */ |
| 359 | 352 | ||
| 360 | /* Number of extra blocks to get each time we ask for more core. | 353 | /* Number of extra blocks to get each time we ask for more core. |