Skip to content

Commit f0409ce

Browse files
Add typecasting to lowercaseCharacter function
1 parent ccf04c2 commit f0409ce

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
-G "Unix Makefiles" \
3636
-DCMAKE_BUILD_TYPE=Debug \
3737
-DUNITTEST=ON \
38-
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG -DLOGGING_LEVEL_DEBUG=1'
38+
-DCMAKE_C_FLAGS='--coverage -Wall -Wextra -DNDEBUG'
3939
make -C build/ all
4040
4141
- name: Test
@@ -47,9 +47,9 @@ jobs:
4747
- name: Run Coverage
4848
run: |
4949
make -C build/ coverage
50-
declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId\*" "\*mocks\*")
51-
echo ${EXCLUDE[@]} | xargs lcov --rc lcov_branch_coverage=1 -r build/coverage.info -o build/coverage.info
52-
lcov --rc lcov_branch_coverage=1 --list build/coverage.info
50+
declare -a EXCLUDE=("\*test\*" "\*CMakeCCompilerId.c")
51+
echo ${EXCLUDE[@]} | xargs lcov --rc branch_coverage=1 --ignore-errors empty --ignore-errors source -r build/coverage.info -o build/coverage.info
52+
lcov --rc branch_coverage=1 --ignore-errors empty --ignore-errors source --list build/coverage.info
5353
5454
- name: Check Coverage
5555
uses: FreeRTOS/CI-CD-Github-Actions/coverage-cop@main

source/sigv4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1417,7 +1417,7 @@ static void generateCredentialScope( const SigV4Parameters_t * pSigV4Params,
14171417

14181418
if( ( inputChar >= 'A' ) && ( inputChar <= 'Z' ) )
14191419
{
1420-
outputChar = inputChar + offset;
1420+
outputChar = ( char ) ( ( ( int8_t ) inputChar ) + offset );
14211421
}
14221422
else
14231423
{

test/unit-test/sigv4_config.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
#ifndef SIGV4_CONFIG_H_
3737
#define SIGV4_CONFIG_H_
3838

39-
40-
#define LOGGING_LEVEL_DEBUG 1
41-
4239
/* @[code_example_loggingmacros] */
4340
/************* Define Logging Macros using printf function ***********/
4441

tools/cmock/coverage.cmake

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ execute_process( COMMAND lcov --directory ${CMAKE_BINARY_DIR}
1414
--base-directory ${CMAKE_BINARY_DIR}
1515
--initial
1616
--capture
17-
--rc lcov_branch_coverage=1
17+
--rc branch_coverage=1
18+
--ignore-errors empty
19+
--ignore-errors source
1820
--rc genhtml_branch_coverage=1
1921
--output-file=${CMAKE_BINARY_DIR}/base_coverage.info
22+
--quiet
2023
)
2124
file(GLOB files "${CMAKE_BINARY_DIR}/bin/tests/*")
2225

@@ -35,6 +38,7 @@ foreach(testname ${files})
3538
file(APPEND ${REPORT_FILE} "${CONTENTS}")
3639
endforeach()
3740

41+
3842
# generate Junit style xml output
3943
execute_process(COMMAND ruby
4044
${CMOCK_DIR}/vendor/unity/auto/parse_output.rb
@@ -45,11 +49,14 @@ execute_process(COMMAND ruby
4549
# capture data after running the tests
4650
execute_process(
4751
COMMAND lcov --capture
48-
--rc lcov_branch_coverage=1
52+
--rc branch_coverage=1
53+
--ignore-errors empty
54+
--ignore-errors source
4955
--rc genhtml_branch_coverage=1
5056
--base-directory ${CMAKE_BINARY_DIR}
5157
--directory ${CMAKE_BINARY_DIR}
5258
--output-file ${CMAKE_BINARY_DIR}/second_coverage.info
59+
--quiet
5360
)
5461

5562
# combile baseline results (zeros) with the one after running the tests
@@ -60,11 +67,17 @@ execute_process(
6067
--add-tracefile ${CMAKE_BINARY_DIR}/second_coverage.info
6168
--output-file ${CMAKE_BINARY_DIR}/coverage.info
6269
--no-external
63-
--rc lcov_branch_coverage=1
70+
--rc branch_coverage=1
71+
--ignore-errors empty
72+
--ignore-errors source
73+
--quiet
6474
)
6575
execute_process(
66-
COMMAND genhtml --rc lcov_branch_coverage=1
76+
COMMAND genhtml --rc branch_coverage=1
77+
--ignore-errors empty
78+
--ignore-errors source
6779
--branch-coverage
6880
--output-directory ${CMAKE_BINARY_DIR}/coverage
6981
${CMAKE_BINARY_DIR}/coverage.info
82+
--quiet
7083
)

0 commit comments

Comments
 (0)