* Update meson.build
- add logic to loop over more lua names (in the future more names might be discovered)
- disable warnings and errors on dependencies

* adding missing includes and checks, correct data types, pointer mess […]
- various functions from string.h were used but never defined
- logic was done across multiple different data types with different signedness, got all of them up to snuff
- give 0 sized array size of 1 (array of size 0 is illegal, but rewriting the code is out of the scope of this commit)
- add preprocessor that marks possibly unused argument as such (does not mean they will get optimized out or anything)
- correctly initialize structs with all data needed

All these were found by generating the project using `meson -Dwarning_level=3 -Dwerror=true`

* remove undefined behavior, correct data types

* Comment manual bit manipulation to be investigated

* check for more edge cases, replace multiple cleanups with goto

* remove system specific includes
This commit is contained in:
Jan
2022-04-15 11:34:46 -04:00
committed by GitHub
parent d323917538
commit fff10a2612
10 changed files with 158 additions and 90 deletions
+3 -3
View File
@@ -27,7 +27,7 @@ static void setup_renderer(RenWindow *ren, int w, int h) {
#endif
void renwin_init_surface(RenWindow *ren) {
void renwin_init_surface(UNUSED RenWindow *ren) {
#ifdef LITE_USE_SDL_RENDERER
if (ren->surface) {
SDL_FreeSurface(ren->surface);
@@ -39,7 +39,7 @@ void renwin_init_surface(RenWindow *ren) {
#endif
}
int renwin_surface_scale(RenWindow *ren) {
int renwin_surface_scale(UNUSED RenWindow *ren) {
#ifdef LITE_USE_SDL_RENDERER
return ren->surface_scale;
#else
@@ -72,7 +72,7 @@ SDL_Surface *renwin_get_surface(RenWindow *ren) {
#endif
}
void renwin_resize_surface(RenWindow *ren) {
void renwin_resize_surface(UNUSED RenWindow *ren) {
#ifdef LITE_USE_SDL_RENDERER
int new_w, new_h;
SDL_GL_GetDrawableSize(ren->window, &new_w, &new_h);