We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4980 - Build fails for SDL_kmsdrm*.c
Summary: Build fails for SDL_kmsdrm*.c
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-13 21:54 UTC by Malte Kießling
Modified: 2020-02-15 00:17 UTC (History)
0 users

See Also:


Attachments
build config (30.78 KB, text/plain)
2020-02-13 21:54 UTC, Malte Kießling
Details
patch (6.62 KB, patch)
2020-02-13 21:59 UTC, Malte Kießling
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Malte Kießling 2020-02-13 21:54:23 UTC
Created attachment 4210 [details]
build config

Since https://hg.libsdl.org/SDL/rev/045f218436fe / bug 4966 i cannot build SDL anymore. The error i get is, essentially, caused by -Werror=declaration-after-statement in SDL_kmsdrmvideo.c and SDL_kmsdrmopengles.c  

I have attached the build config (cmake output) and a failed partial build (to keep the log down). I tried this directly on the revision and on tip, the error is the same.

Interestingly, a build with clang  goes through, as -Werror=declaration-after-statement is not set. 

I will also attatch a patch in a moment
Comment 1 Malte Kießling 2020-02-13 21:59:41 UTC
Created attachment 4211 [details]
patch

quick fix, moving the declarations up. 
I hopefully kept all non-trivial assignments where they were. 
Patch is created from tip.
Comment 2 Sam Lantinga 2020-02-15 00:17:32 UTC
Patch added, thanks!
https://hg.libsdl.org/SDL/rev/9761858bd6a3