Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Silence -Wdangling-pointer warnings from gcc >= 12:
Those local vars do _not_ actually go out of scope. ../h2shared/d_sprite.c: In function 'D_DrawSprite': ../h2shared/d_sprite.c:706:22: warning: storing the address of local variable 'spans' in 'sprite_spans' [-Wdangling-pointer=] 706 | sprite_spans = spans; | ~~~~~~~~~~~~~^~~~~~~ ../h2shared/d_sprite.c:704:25: note: 'spans' declared here 704 | sspan_t spans[MAXHEIGHT+1]; | ^~~~~ ../h2shared/d_sprite.c:29:18: note: 'sprite_spans' declared here 29 | static sspan_t *sprite_spans; | ^~~~~~~~~~~~ ../h2shared/r_draw.c: In function 'R_RenderBmodelFace': ../h2shared/r_draw.c:609:17: warning: storing the address of local variable 'tedge' in 'r_pedge' [-Wdangling-pointer=] 609 | r_pedge = &tedge; | ~~~~~~~~^~~~~~~~ ../h2shared/r_draw.c:589:25: note: 'tedge' declared here 589 | medge_t tedge; | ^~~~~ ../h2shared/r_draw.c:48:18: note: 'r_pedge' declared here 48 | medge_t *r_pedge; | ^~~~~~~ r_main.c: In function 'R_DrawViewModel': r_main.c:843:34: warning: storing the address of local variable 'lightvec' in 'r_viewlighting.plightvec' [-Wdangling-pointer=] 843 | r_viewlighting.plightvec = lightvec; | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ r_main.c:779:25: note: 'lightvec' declared here 779 | float lightvec[3] = {-1, 0, 0}; | ^~~~~~~~ r_main.c:28:17: note: 'r_viewlighting' declared here 28 | static alight_t r_viewlighting = {128, 192, viewlightvec}; | ^~~~~~~~~~~~~~
- Loading branch information