Skip to content

Commit 4466702

Browse files
committed
cmake: set warning level to -Wextra (for the main connector code)
1 parent ab188b3 commit 4466702

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

CMakeLists.txt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,13 +261,12 @@ ADD_SUBDIRECTORY(include)
261261
INCLUDE_DIRECTORIES(include)
262262

263263
#
264-
# Set higher warning level on Windows to catch non-portable
265-
# code.
264+
# Set higher warning level for the main connector code.
266265
#
267266

268267
foreach(LANG C CXX)
269268

270-
IF(WIN32)
269+
if(WIN32)
271270

272271
# 4127 = conditional expression is constant (needed for do {...} while(false))
273272
# 4512 = assignment operator could not be generated
@@ -279,7 +278,12 @@ IF(WIN32)
279278

280279
set(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} /W4 /wd4512 /wd4127")
281280

282-
ENDIF()
281+
else()
282+
283+
set(CMAKE_${LANG}_FLAGS "${CMAKE_${LANG}_FLAGS} -Wextra")
284+
set(TEST_COMPILE_FLAGS "-Wno-sign-compare")
285+
286+
endif()
283287

284288
endforeach(LANG)
285289

xapi/mysqlx_cc_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ class Order_by : public cdk::Order_by
305305

306306

307307
// Get sort direction for the current instance
308-
const Sort_direction::value direction() const { return m_sort_direction; }
308+
Sort_direction::value direction() const { return m_sort_direction; }
309309
};
310310

311311
typedef std::vector<Order_by_item> Order_item_list;

0 commit comments

Comments
 (0)