Skip to content

Commit a00e5b3

Browse files
committed
Fix clang warnings: mark Screen overrides and replace deprecated -Ofast with -O3 -ffast-math
1 parent 945518d commit a00e5b3

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang"
104104
add_compile_options(-fsanitize=thread -fno-omit-frame-pointer)
105105
add_link_options(-fsanitize=thread)
106106
else()
107-
set(OPTIMIZATION_FLAGS "-Ofast")
107+
set(OPTIMIZATION_FLAGS "-O3 -ffast-math")
108108
endif()
109109
add_compile_options("-Wall")
110110
add_compile_options("-Wno-psabi")

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ OBJ = Config.o DeviceManager.o Main.o MapTiles.o Prometheus.o Receiver.o WebDB.o
33
INCLUDE = -I. -ISource -ISource/JSON/ -ISource/DBMS/ -ISource/Tracking/ -ISource/Library/ -ISource/Marine/ -ISource/Aviation/ -ISource/DSP/ -ISource/Application/ -ISource/IO/ -ISource/Utilities/
44
CC = clang
55

6-
override CFLAGS += -Ofast -std=c++11 -g -pg -Wno-sign-compare $(INCLUDE)
6+
override CFLAGS += -O3 -ffast-math -std=c++11 -g -pg -Wno-sign-compare $(INCLUDE)
77
override LFLAGS += -lstdc++ -lpthread -g -pg -lm -o AIS-catcher
88

99
CFLAGS_RTL = -DHASRTLSDR $(shell pkg-config --cflags librtlsdr)

Source/IO/Screen.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ namespace IO
5151
using StreamIn<AIS::GPS>::Receive;
5252

5353
void Connect(Receiver &r);
54-
void Receive(const AIS::Message *data, int len, TAG &tag);
55-
void Receive(const JSON::JSON *data, int len, TAG &tag);
56-
void Receive(const AIS::GPS *data, int len, TAG &tag);
54+
void Receive(const AIS::Message *data, int len, TAG &tag) override;
55+
void Receive(const JSON::JSON *data, int len, TAG &tag) override;
56+
void Receive(const AIS::GPS *data, int len, TAG &tag) override;
5757

58-
Setting &SetKey(AIS::Keys key, const std::string &arg)
58+
Setting &SetKey(AIS::Keys key, const std::string &arg) override
5959
{
6060
switch (key)
6161
{

0 commit comments

Comments
 (0)