From 823b7a5008a0b40618c3aec78ff5cea3f72d9c05 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sat, 1 Apr 2017 02:48:59 +0000 Subject: [PATCH] tweaks for the compiler --- resynth.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resynth.c b/resynth.c index c454596..6e24a13 100644 --- a/resynth.c +++ b/resynth.c @@ -35,7 +35,10 @@ // we only use png (stbi_write_png) in this case. #define STB_IMAGE_WRITE_IMPLEMENTATION #define STB_IMAGE_WRITE_STATIC +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-prototypes" #include "stb_image_write.h" +#pragma GCC diagnostic pop // this isn't the prettiest way of handling memory errors, // but it should suffice for our one-thing one-shot program. @@ -359,8 +362,7 @@ static void run(Resynth_state *s, Parameters parameters) { } } - // (this macro might not exist on any compiler that isn't gcc or clang) - s->best = __INT_MAX__; + s->best = INT_MAX; // consider each neighboring pixel collected as a best-fit. for (int j = 0; j < s->n_neighbors && s->best != 0; j++) {