Skip to content

Commit

Permalink
Fix compiler warnings (Linux)
Browse files Browse the repository at this point in the history
We suppress some 3rd-party code warnings, but it was done using
Windows compiler syntax. We fix it to do the same for gcc compiler
too.
  • Loading branch information
vahancho committed Mar 28, 2023
1 parent 438db31 commit ab9fcd0
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,24 @@
#include "image.h"
#include "point.h"

#pragma warning(push, 0)
#if defined(_MSC_VER)
#pragma warning(push, 0)
#else
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#endif

#define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h"

#define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h"
#pragma warning (pop)

#if defined(_MSC_VER)
#pragma warning (pop)
#else
#pragma GCC diagnostic pop
#endif

namespace nkar
{
Expand Down

0 comments on commit ab9fcd0

Please sign in to comment.