Skip to content

Commit

Permalink
Initial implementation to fix errors.
Browse files Browse the repository at this point in the history
Signed-off-by: currantw <[email protected]>
  • Loading branch information
currantw committed Nov 20, 2024
1 parent edd708a commit 2b1f9e2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 11 additions & 1 deletion run_cppcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ RESULTS_FILE=cppcheck-results.log
# --force: force checks all define combinations (default max is 12)
# -iaws-sdk-cpp: avoid checking AWS C++ SDK source files in our repo
# -UWIN32: do not check WIN32-defined codepaths; this would throw errors on Mac
cppcheck --force -iaws-sdk-cpp -UWIN32 ./src 2> ${RESULTS_FILE}
# --check-level: use exhaustive checking for pipeline jobs; can disable during active development for quicker results
# --inline-suppr: enable inline error suppression
# -i: ignore CMake and installed files

cppcheck \
--force -iaws-sdk-cpp -UWIN32 \
--check-level=exhaustive \
--inline-suppr \
-i "src/vcpkg_installed" \
-i "src/cmake-build-debug" \
./src 2> ${RESULTS_FILE}

if [ -s ${RESULTS_FILE} ]; then
echo "!! Cppcheck errors found! Check ${RESULTS_FILE} for details."
Expand Down
3 changes: 3 additions & 0 deletions src/opensearchenlist/msdtc_enlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,10 @@ RETCODE static EnlistInDtc_1pipe(void *conn, ITransaction *pTra,
case DTC_CHECK_RM_CONNECTION:
if (!confirmingLink) {
confirmingLink = true;

// cppcheck-suppress unknownMacro
strcat(dtcname, ";" KEYWORD_DTC_CHECK "=0");

continue;
}
default:
Expand Down

0 comments on commit 2b1f9e2

Please sign in to comment.