| Summary: | add compilation flag -Wshadow | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Sylvain <sylvain.becker> |
| Component: | *don't know* | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: |
patch 1
full patch for shadow |
||
|
Description
Sylvain
2014-05-20 06:10:44 UTC
I added -Wshadow and then turned it off again because of massive variable shadowing in the blit macros. https://hg.libsdl.org/SDL/rev/c23ffe72934c Anyone can feel free to reopen this if you want to go through that code and fix it. Just uncomment CheckWarnShadow in configure.in if you want to try this. Thanks, I can have a look at that :) Thanks. :) Created attachment 1701 [details]
patch 1
here's a first patch with a few shadowed variables (no blit and duff loop stuff).
Created attachment 1702 [details]
full patch for shadow
here's the full patch for Blit + RLE.
It compiles.. but I am not sure that RLE get tested.
It remains a shadow variable on SDL_video.c : static _this + _this parameter, but It seems this is on purpose. since there are patchs, I just reopen it ... |