| Summary: | GCC Warnings: ANSI-C90 violation in SDL_video.h and SDL_sensor.h public headers | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Vitaly Novichkov <admin> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | sezeroz |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | One of fragment contains a C90 violation | ||
Why do you use -pedantic ? There are more scary warnings, e.g. with gcc-4.4 on CentOS6 a million of -Wstrict-aliasing from mainly but not limited to joystick layer. Speaking for myself, -pedantic warnings like those comma at the end of enumerator list, are just annoyance. (In reply to Ozkan Sezer from comment #1) > Why do you use -pedantic ? I having a library which partually does using of SDL2 (Mainly for RWops support), and the library is intended to be compatible with any compiler include some ancient of them. Then, I think, I'll try to include into that library the SDL_RWops only to avoid including of useless stuff. > There are more scary warnings, e.g. with gcc-4.4 on CentOS6 > a million of -Wstrict-aliasing from mainly but not limited to > joystick layer. Speaking for myself, -pedantic warnings like > those comma at the end of enumerator list, are just annoyance. The only reason to enable them is polishing the compatibility for older compilers where are those "warnings" are errors. |
Created attachment 3299 [details] One of fragment contains a C90 violation Hello! Just now I have caught several warnings in your public headers are caused by a comma at end of enumerator list: ``` SDL_sensor.h:74: предупреждение: comma at end of enumerator list [-Wpedantic] SDL_SENSOR_GYRO, /**< Gyroscope */ ^ SDL_video.h:178: предупреждение: comma at end of enumerator list [-Wpedantic] SDL_DISPLAYEVENT_ORIENTATION, /**< Display orientation has changed to data1 */ ^ SDL_video.h:187: предупреждение: comma at end of enumerator list [-Wpedantic] SDL_ORIENTATION_PORTRAIT_FLIPPED, /**< The display is in portrait mode, upside down */ ^ ```