Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
6d90b5a
Fix crash on Windows with -j option
chrchr-github Jun 23, 2022
be493b7
Disable CI-cygwin workflow
chrchr-github Jun 30, 2022
32c474b
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
8485468
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
251470d
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
fa8fe1f
Try to fix Cygwin build
chrchr-github Jul 7, 2022
15aa454
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
f4fcd41
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
ec68b64
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
6042184
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
149915c
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
e46177a
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
95922a2
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
d70dfa8
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
253484f
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
25def30
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
7981305
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
7d36d58
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
f18a679
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
392174b
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
ccac2c9
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
206bae1
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
544099f
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
deddb2e
Update CI-cygwin.yml
chrchr-github Jul 7, 2022
a34d6cd
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
fc0ec26
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
cbb606f
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
a4617fd
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
6873e04
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
6368442
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
c202eb7
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
5dd44d3
Update CI-cygwin.yml
chrchr-github Jul 8, 2022
d264d36
Merge branch 'main' into chr_FixCrashLib
chrchr-github Jul 8, 2022
6b7538f
Cygwin uses THREADING_MODEL_FORK
chrchr-github Jul 8, 2022
c0cddbf
Restore workflows
chrchr-github Jul 8, 2022
f1fe470
Remove comment
chrchr-github Jul 8, 2022
0af441a
Fix dmake
chrchr-github Jul 8, 2022
dd5d3e6
Fix #11179 FP invalidFunctionArgStr
chrchr-github Jul 11, 2022
aaaaf16
Revert "Fix #11179 FP invalidFunctionArgStr"
chrchr-github Jul 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions .github/workflows/CI-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
matrix:
os: [windows-2019]
arch: [x64, x86]
include:
- platform: 'x86_64'
packages: |
gcc-g++
fail-fast: false

runs-on: ${{ matrix.os }}
Expand All @@ -24,26 +28,27 @@ jobs:
- uses: actions/checkout@v2

- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v3
uses: cygwin/cygwin-install-action@master
with:
platform: ${{ matrix.arch }}
packages: ${{ matrix.packages }}

- name: Build cppcheck
run: |
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2

- name: Build test
run: |
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 testrunner
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 testrunner

- name: Run test
run: |
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 check
C:\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE% && make -j2 check

- name: Extra test for misra
run: |
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE%\addons\test
..\..\cppcheck --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64 && python3 ..\misra.py -verify misra\misra-test.c.dump
C:\tools\cygwin\bin\bash.exe -l -c cd %GITHUB_WORKSPACE%
.\cppcheck --addon=misra --inline-suppr --enable=information --error-exitcode=1 addons\test\misra\misra-ctu-*-test.c
cd %GITHUB_WORKSPACE%\addons\test
..\..\cppcheck.exe --dump -DDUMMY --suppress=uninitvar --inline-suppr misra\misra-test.c --std=c89 --platform=unix64
python3 ..\misra.py -verify misra\misra-test.c.dump
..\..\cppcheck.exe --addon=misra --inline-suppr --enable=information --error-exitcode=1 misra\misra-ctu-1-test.c misra\misra-ctu-2-test.c

2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ ifndef CXXFLAGS
endif

ifeq (g++, $(findstring g++,$(CXX)))
override CXXFLAGS += -std=c++0x
override CXXFLAGS += -std=gnu++0x
else ifeq (clang++, $(findstring clang++,$(CXX)))
override CXXFLAGS += -std=c++0x
else ifeq ($(CXX), c++)
Expand Down
2 changes: 1 addition & 1 deletion cli/processexecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

#include "processexecutor.h"

#if !defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__)
#if !defined(WIN32) && !defined(__MINGW32__)

#include "color.h"
#include "config.h"
Expand Down
2 changes: 1 addition & 1 deletion lib/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static const std::string emptyString;
#elif defined(USE_THREADS)
#define THREADING_MODEL_THREAD
#define STDCALL
#elif ((defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__) && !defined(__CYGWIN__)) || defined(__CPPCHECK__)
#elif ((defined(__GNUC__) || defined(__sun)) && !defined(__MINGW32__)) || defined(__CPPCHECK__)
#define THREADING_MODEL_FORK
#define STDCALL
#else
Expand Down
4 changes: 2 additions & 2 deletions lib/programmemory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -847,8 +847,8 @@ ValueFlow::Value evaluateLibraryFunction(const std::unordered_map<nonneg int, Va
const std::string& returnValue,
const Settings* settings)
{
static std::unordered_map<std::string,
std::function<ValueFlow::Value(const std::unordered_map<nonneg int, ValueFlow::Value>& arg)>>
thread_local static std::unordered_map<std::string,
std::function<ValueFlow::Value(const std::unordered_map<nonneg int, ValueFlow::Value>& arg)>>
functions = {};
if (functions.count(returnValue) == 0) {

Expand Down
2 changes: 1 addition & 1 deletion tools/dmake.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ int main(int argc, char **argv)
}

fout << "ifeq (g++, $(findstring g++,$(CXX)))\n"
<< " override CXXFLAGS += -std=c++0x\n"
<< " override CXXFLAGS += -std=gnu++0x\n"
<< "else ifeq (clang++, $(findstring clang++,$(CXX)))\n"
<< " override CXXFLAGS += -std=c++0x\n"
<< "else ifeq ($(CXX), c++)\n"
Expand Down