Skip to content

Commit 9beec7e

Browse files
Build with warnings as errors (#289)
* Refs #23858. Build with warnings as errors. Signed-off-by: Miguel Company <[email protected]> * Refs #23858. Add option for MSVC Signed-off-by: Miguel Company <[email protected]> * Refs #23858. Fix warning. Signed-off-by: Miguel Company <[email protected]> * Refs #23858. Move to CI Signed-off-by: Ricardo González Moreno <[email protected]> * Apply suggestion Co-authored-by: Miguel Company <[email protected]> Signed-off-by: Ricardo González <[email protected]> --------- Signed-off-by: Miguel Company <[email protected]> Signed-off-by: Ricardo González Moreno <[email protected]> Signed-off-by: Ricardo González <[email protected]> Co-authored-by: Ricardo González Moreno <[email protected]>
1 parent c88e2ea commit 9beec7e

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

.github/workflows/reusable-ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ on:
5353
type: boolean
5454
default: false
5555
env:
56+
colcon-build-default-cmake-args: ${{ contains(inputs.os-version, 'windows') && '-DCMAKE_CXX_FLAGS_INIT="/WX"' || '-DCMAKE_CXX_FLAGS_INIT="-Werror"' }}
5657
toolset: ${{ inputs.vs-toolset && format('-T {0}', inputs.vs-toolset) || '' }}
5758
defaults:
5859
run:
@@ -122,7 +123,7 @@ jobs:
122123
colcon_build_args: ${{ inputs.colcon-args }}
123124
colcon_build_args_default: --event-handlers=console_direct+
124125
cmake_args: ${{ inputs.cmake-args }}
125-
cmake_args_default: ${{ env.toolset }}
126+
cmake_args_default: ${{ env.colcon-build-default-cmake-args }} ${{ env.toolset }}
126127
cmake_build_type: ${{ matrix.cmake-build-type }}
127128
workspace: ${{ github.workspace }}
128129

test/cdr/SimpleTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,7 @@ TEST(CDRTests, DeserializeIntoANonEmptyMapInXCDRv1)
22652265
};
22662266

22672267
std::map<uint16_t, std::string> initialized_map{
2268-
{1, "a"}
2268+
{static_cast<uint16_t>(1u), "a"}
22692269
};
22702270

22712271
FastBuffer cdr_buffer(buffer, 14);

0 commit comments

Comments
 (0)