From 998cb11218189625a3f62eb7c44d5493ac1aa6aa Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Fri, 25 Nov 2022 13:12:31 +0000 Subject: [PATCH] Add newlines to the end of files without them; enable warnings on compile --- Makefile | 3 ++- source/engine/dsp.c | 2 +- source/engine/dsp.h | 2 +- source/engine/ed_project.c | 2 +- source/engine/ed_project.h | 2 +- source/engine/gameobject.c | 2 +- source/engine/input.c | 2 +- source/engine/mix.c | 2 +- source/engine/mix.h | 2 +- source/engine/mrbffi.h | 2 +- source/engine/music.c | 2 +- source/engine/music.h | 2 +- source/engine/nuke.h | 2 +- source/engine/registry.c | 2 +- source/engine/script.c | 2 +- source/engine/sound.c | 2 +- source/engine/static_actor.c | 2 +- source/engine/thirdparty/stb/include/stb_ds.h | 2 +- source/engine/thirdparty/stb/include/stb_vorbis.h | 2 +- source/engine/timer.h | 2 +- source/engine/transform.c | 2 +- source/engine/window.c | 2 +- 22 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 83c722f..467ffd3 100755 --- a/Makefile +++ b/Makefile @@ -47,7 +47,8 @@ eobjects != $(call rm,$(eobjects),sqlite pl_mpeg_extract_frames pl_mpeg_player y includeflag != $(call prefix,$(edirs),-I) -WARNING_FLAGS = -Wall -pedantic #-Wno-incompatible-function-pointer-types -Wunsupported -Wall -Wextra -Wwrite-strings -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Wno-incompatible-function-pointer-types -Wno-gnu-statement-expression -Wno-complex-component-init -pedantic +WARNING_FLAGS = #-Wall -pedantic -Wunsupported -Wextra -Wwrite-strings +NO_WARNING_FLAGS = -Wno-incompatible-function-pointer-types -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Wno-incompatible-function-pointer-types -Wno-gnu-statement-expression -Wno-complex-component-init SEM = 0.0.1 COM != git rev-parse --short HEAD diff --git a/source/engine/dsp.c b/source/engine/dsp.c index fd45960..4985753 100644 --- a/source/engine/dsp.c +++ b/source/engine/dsp.c @@ -629,4 +629,4 @@ void dsp_bitcrush(void *p, short *out, int n) for (int j = 0; j < CHANNELS; j++) out[i*CHANNELS+j] = (out[i*CHANNELS+j] | 0xFF); /* Mask out the lower 8 bits */ } -} \ No newline at end of file +} diff --git a/source/engine/dsp.h b/source/engine/dsp.h index 9297ace..9eb00c8 100644 --- a/source/engine/dsp.h +++ b/source/engine/dsp.h @@ -153,4 +153,4 @@ void dsp_mono(void *p, short *out, int n); void dsp_bitcrush(void *p, short *out, int n); -#endif \ No newline at end of file +#endif diff --git a/source/engine/ed_project.c b/source/engine/ed_project.c index 53e7481..b1449e4 100644 --- a/source/engine/ed_project.c +++ b/source/engine/ed_project.c @@ -92,4 +92,4 @@ void editor_save_projects() FILE *f = fopen("projects.yugh", "w"); vec_store(projects, f); fclose(f); -} \ No newline at end of file +} diff --git a/source/engine/ed_project.h b/source/engine/ed_project.h index 3d92bee..b916452 100644 --- a/source/engine/ed_project.h +++ b/source/engine/ed_project.h @@ -15,4 +15,4 @@ void editor_proj_select_gui(); void editor_import_project(char *path); void editor_make_project(char *path); -#endif \ No newline at end of file +#endif diff --git a/source/engine/gameobject.c b/source/engine/gameobject.c index 2634b64..52156b9 100644 --- a/source/engine/gameobject.c +++ b/source/engine/gameobject.c @@ -298,4 +298,4 @@ void object_gui(struct gameobject *go) if (n >= 0) gameobject_delcomponent(go, n); -} \ No newline at end of file +} diff --git a/source/engine/input.c b/source/engine/input.c index fa30fea..2349bd1 100644 --- a/source/engine/input.c +++ b/source/engine/input.c @@ -132,4 +132,4 @@ int action_up(int scancode) } return !found; -} \ No newline at end of file +} diff --git a/source/engine/mix.c b/source/engine/mix.c index feab359..e52d032 100644 --- a/source/engine/mix.c +++ b/source/engine/mix.c @@ -37,4 +37,4 @@ void bus_fill_buffers(short *master, int n) { master[i] += bus[j].buf[i]; } } -} \ No newline at end of file +} diff --git a/source/engine/mix.h b/source/engine/mix.h index 4670d63..9265154 100644 --- a/source/engine/mix.h +++ b/source/engine/mix.h @@ -26,4 +26,4 @@ void bus_fill_buffers(short *master, int n); void bus_free(struct bus *bus); -#endif \ No newline at end of file +#endif diff --git a/source/engine/mrbffi.h b/source/engine/mrbffi.h index 0b2e9dd..8f5b584 100644 --- a/source/engine/mrbffi.h +++ b/source/engine/mrbffi.h @@ -3,4 +3,4 @@ void ffi_load(); -#endif \ No newline at end of file +#endif diff --git a/source/engine/music.c b/source/engine/music.c index 8ffd7f3..64b9f3c 100644 --- a/source/engine/music.c +++ b/source/engine/music.c @@ -122,4 +122,4 @@ void music_pause() void sound_play() { -} \ No newline at end of file +} diff --git a/source/engine/music.h b/source/engine/music.h index ad02173..1083d30 100644 --- a/source/engine/music.h +++ b/source/engine/music.h @@ -16,4 +16,4 @@ extern float music_pan; void play_song(const char *midi, const char *sf); void dsp_midi_fillbuf(struct dsp_midi_song *song, void *out, int n); -#endif \ No newline at end of file +#endif diff --git a/source/engine/nuke.h b/source/engine/nuke.h index cdf6bae..0a62d90 100644 --- a/source/engine/nuke.h +++ b/source/engine/nuke.h @@ -28,4 +28,4 @@ int nuke_btn(const char *lbl); #define nuke_labelf(STR, ...) nk_labelf(ctx, NK_TEXT_LEFT, STR, __VA_ARGS__) #define nuke_prop_float(LABEL, MIN, VAL, MAX, STEP, DRAG) nk_property_float(ctx, LABEL, MIN, VAL, MAX, STEP, DRAG) -#endif \ No newline at end of file +#endif diff --git a/source/engine/registry.c b/source/engine/registry.c index 0e2e819..cb36e08 100644 --- a/source/engine/registry.c +++ b/source/engine/registry.c @@ -73,4 +73,4 @@ void comp_draw_debug(struct component *c) { void comp_draw_gui(struct component *c) { c->draw_gui(c->data); -} \ No newline at end of file +} diff --git a/source/engine/script.c b/source/engine/script.c index ae6f60e..0a48205 100644 --- a/source/engine/script.c +++ b/source/engine/script.c @@ -64,4 +64,4 @@ void script_call_sym(mrb_sym sym) int script_has_sym(mrb_sym sym) { return mrb_respond_to(mrb, obj, sym); -} \ No newline at end of file +} diff --git a/source/engine/sound.c b/source/engine/sound.c index ec907ed..df63f3f 100644 --- a/source/engine/sound.c +++ b/source/engine/sound.c @@ -329,4 +329,4 @@ float pct2mult(float pct) if (pct <= 0) return 0.f; return pow(10, 0.5*log2(pct)); -} \ No newline at end of file +} diff --git a/source/engine/static_actor.c b/source/engine/static_actor.c index aa83326..bf8c6a0 100644 --- a/source/engine/static_actor.c +++ b/source/engine/static_actor.c @@ -91,4 +91,4 @@ void staticactor_gui(struct mStaticActor *sa) } } -} \ No newline at end of file +} diff --git a/source/engine/thirdparty/stb/include/stb_ds.h b/source/engine/thirdparty/stb/include/stb_ds.h index 391e8cf..e84c82d 100755 --- a/source/engine/thirdparty/stb/include/stb_ds.h +++ b/source/engine/thirdparty/stb/include/stb_ds.h @@ -1892,4 +1892,4 @@ AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ------------------------------------------------------------------------------ -*/ \ No newline at end of file +*/ diff --git a/source/engine/thirdparty/stb/include/stb_vorbis.h b/source/engine/thirdparty/stb/include/stb_vorbis.h index b0589bf..209d448 100644 --- a/source/engine/thirdparty/stb/include/stb_vorbis.h +++ b/source/engine/thirdparty/stb/include/stb_vorbis.h @@ -415,4 +415,4 @@ enum STBVorbisError // // HEADER ENDS HERE // -////////////////////////////////////////////////////////////////////////////// \ No newline at end of file +////////////////////////////////////////////////////////////////////////////// diff --git a/source/engine/timer.h b/source/engine/timer.h index fcae775..72264a2 100644 --- a/source/engine/timer.h +++ b/source/engine/timer.h @@ -27,4 +27,4 @@ void timer_settime(struct timer *t, double interval); void *arrfind(void *arr, int (*valid)(void *arr, void *cmp), void *cmp); void arrwalk(void *arr, void (*fn)(void *data)); -#endif \ No newline at end of file +#endif diff --git a/source/engine/transform.c b/source/engine/transform.c index 0d5a50e..e614083 100644 --- a/source/engine/transform.c +++ b/source/engine/transform.c @@ -50,4 +50,4 @@ void trans_drawgui(struct mTransform *T) nk_property_float3(ctx, "Position", -1000.f, T->position, 1000.f, 1.f, 1.f); nk_property_float3(ctx, "Rotation", 0.f, T->rotation, 360.f, 1.f, 0.1f); nk_property_float(ctx, "Scale", 0.f, &T->scale, 1000.f, 0.1f, 0.1f); -} \ No newline at end of file +} diff --git a/source/engine/window.c b/source/engine/window.c index 29c61fb..bb6df15 100644 --- a/source/engine/window.c +++ b/source/engine/window.c @@ -296,4 +296,4 @@ void window_renderall() { //arrwalk(windows, window_render); for (int i = 0; i < arrlen(windows); i++) window_render(&windows[i]); -} \ No newline at end of file +}