mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
Enable "debug" optimizations in make develop
Enhances some warnings as well as the sanitizers (Clang especially complained about it) The `-f*` flags are to get better stack traces out of the sanitizers, as recommended by Clang's docs: https://clang.llvm.org/docs/AddressSanitizer.html#usage GCC's docs claim that these optimizations should not hinder the debugging experience, and Clang's don't mention optimization flags at all.
This commit is contained in:
@@ -95,6 +95,9 @@ void output_png_file(const struct Options *opts,
|
||||
if (!f)
|
||||
err("Opening output png file '%s' failed", outfile);
|
||||
|
||||
if (opts->debug)
|
||||
free(outfile);
|
||||
|
||||
img.png = png_create_write_struct(PNG_LIBPNG_VER_STRING,
|
||||
NULL, NULL, NULL);
|
||||
if (!img.png)
|
||||
@@ -135,9 +138,6 @@ void output_png_file(const struct Options *opts,
|
||||
|
||||
png_destroy_write_struct(&img.png, &img.info);
|
||||
fclose(f);
|
||||
|
||||
if (opts->debug)
|
||||
free(outfile);
|
||||
}
|
||||
|
||||
void destroy_raw_image(struct RawIndexedImage **raw_image_ptr_ptr)
|
||||
|
||||
Reference in New Issue
Block a user