From 13ed20c6e3cc2a5029d33df39cffbcc219fbacf1 Mon Sep 17 00:00:00 2001 From: garakmon Date: Sat, 16 Jun 2018 18:49:27 -0400 Subject: compiler fixes The compiler flag -s is not necessary and causes build failure on some systems (macOS, clang compilers) due to it being deprecated. Additionally, on those same systems, tools/aif2pcm/main.c failed to compile due to an overly cautious compiler not liking some struct declarations. These changes afaik do not affect other builds. --- tools/preproc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools/preproc') diff --git a/tools/preproc/Makefile b/tools/preproc/Makefile index ec4a5f365..3d3275819 100644 --- a/tools/preproc/Makefile +++ b/tools/preproc/Makefile @@ -1,6 +1,6 @@ CXX := g++ -CXXFLAGS := -std=c++11 -O2 -s -Wall -Wno-switch -Werror +CXXFLAGS := -std=c++11 -O2 -Wall -Wno-switch -Werror SRCS := asm_file.cpp c_file.cpp charmap.cpp preproc.cpp string_parser.cpp \ utf8.cpp -- cgit v1.2.3 From aeceecea3d0e3bc2d4ef183263683d3fbf2eaadc Mon Sep 17 00:00:00 2001 From: einstein95 Date: Sun, 29 Jul 2018 20:02:31 +1200 Subject: Port over https://github.com/pret/pokeruby/commit/9d96147bbf8dabc2a28105d73905808e70b73b0f --- tools/preproc/asm_file.cpp | 2 +- tools/preproc/c_file.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tools/preproc') diff --git a/tools/preproc/asm_file.cpp b/tools/preproc/asm_file.cpp index bb296b78b..383010aa3 100644 --- a/tools/preproc/asm_file.cpp +++ b/tools/preproc/asm_file.cpp @@ -266,7 +266,7 @@ int AsmFile::ReadString(unsigned char* s) { m_pos += stringParser.ParseString(m_pos, s, length); } - catch (std::runtime_error e) + catch (std::runtime_error& e) { RaiseError(e.what()); } diff --git a/tools/preproc/c_file.cpp b/tools/preproc/c_file.cpp index 24b3453e8..2f4bfea7c 100644 --- a/tools/preproc/c_file.cpp +++ b/tools/preproc/c_file.cpp @@ -206,7 +206,7 @@ void CFile::TryConvertString() { m_pos += stringParser.ParseString(m_pos, s, length); } - catch (std::runtime_error e) + catch (std::runtime_error& e) { RaiseError(e.what()); } -- cgit v1.2.3