Skip to content

Commit 6cf3eed

Browse files
Merge branch 'main' into chr_15087
2 parents 74b89d2 + 33c2c43 commit 6cf3eed

184 files changed

Lines changed: 18475 additions & 2602 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/workflows/codeql-analysis.yml‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ jobs:
4242
uses: github/codeql-action/init@v4
4343
with:
4444
languages: ${{ matrix.language }}
45+
config: |
46+
paths-ignore:
47+
- gui/manualtest
4548
4649
- name: Build cppcheck
4750
if: matrix.language == 'cpp'

‎addons/threadsafety.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@
9191
'race:stdin',
9292
'race:stdout',
9393
'race:streams',
94-
'race:strerror',
9594
'race:strsignal',
9695
'race:strtok',
9796
'race:tmbuf',
@@ -261,7 +260,6 @@
261260
'siginterrupt',
262261
'sleep',
263262
'srand48',
264-
'strerror',
265263
'strsignal',
266264
'strtok',
267265
'tmpnam',

‎cfg/gnu.cfg‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@
650650
<not-bool/>
651651
</arg>
652652
</function>
653-
<!-- https://man7.org/linux/man-pages/man3/mempcpy.3.html-->
653+
<!-- https://man7.org/linux/man-pages/man3/wmempcpy.3.html -->
654654
<!-- wchar_t *wmempcpy(wchar_t *restrict dest, const wchar_t *restrict src, size_t n);-->
655655
<function name="wmempcpy">
656656
<returnValue type="wchar_t *"/>
@@ -659,12 +659,12 @@
659659
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" size-arg="3"/>
660660
<arg nr="1" direction="out">
661661
<not-null/>
662-
<minsize type="argvalue" arg="3"/>
662+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
663663
</arg>
664664
<arg nr="2" direction="in">
665665
<not-null/>
666666
<not-uninit/>
667-
<minsize type="argvalue" arg="3"/>
667+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
668668
</arg>
669669
<arg nr="3" direction="in">
670670
<not-uninit/>

‎cfg/std.cfg‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3928,7 +3928,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
39283928
<arg nr="1">
39293929
<not-null/>
39303930
<not-uninit/>
3931-
<minsize type="argvalue" arg="3"/>
3931+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
39323932
</arg>
39333933
<arg nr="2" direction="in">
39343934
<not-uninit/>
@@ -3974,12 +3974,12 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
39743974
<arg nr="1" direction="in">
39753975
<not-null/>
39763976
<not-uninit/>
3977-
<minsize type="argvalue" arg="3"/>
3977+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
39783978
</arg>
39793979
<arg nr="2" direction="in">
39803980
<not-null/>
39813981
<not-uninit/>
3982-
<minsize type="argvalue" arg="3"/>
3982+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
39833983
</arg>
39843984
<arg nr="3" direction="in">
39853985
<not-uninit/>
@@ -4016,12 +4016,12 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
40164016
<not-overlapping-data ptr1-arg="1" ptr2-arg="2" count-arg="3"/>
40174017
<arg nr="1" direction="out">
40184018
<not-null/>
4019-
<minsize type="argvalue" arg="3"/>
4019+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
40204020
</arg>
40214021
<arg nr="2" direction="in">
40224022
<not-null/>
40234023
<not-uninit/>
4024-
<minsize type="argvalue" arg="3"/>
4024+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
40254025
</arg>
40264026
<arg nr="3" direction="in">
40274027
<not-uninit/>
@@ -4081,13 +4081,13 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
40814081
<leak-ignore/>
40824082
<arg nr="1" direction="out">
40834083
<not-null/>
4084-
<minsize type="argvalue" arg="3"/>
4084+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
40854085
</arg>
40864086
<arg nr="2">
40874087
<!-- TODO: direction? memory could be overwritten -->
40884088
<not-null/>
40894089
<not-uninit/>
4090-
<minsize type="argvalue" arg="3"/>
4090+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
40914091
</arg>
40924092
<arg nr="3" direction="in">
40934093
<not-uninit/>
@@ -4141,7 +4141,7 @@ The obsolete function 'gets' is called. With 'gets' you'll get a buffer overrun
41414141
<leak-ignore/>
41424142
<arg nr="1" direction="out">
41434143
<not-null/>
4144-
<minsize type="argvalue" arg="3"/>
4144+
<minsize type="argvalue" arg="3" baseType="wchar_t"/>
41454145
</arg>
41464146
<arg nr="2" direction="in">
41474147
<not-uninit/>

‎gui/checkthread.cpp‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ CheckThread::CheckThread(ThreadResult &result, int threadIndex)
113113
void CheckThread::setSettings(const Settings &settings, std::shared_ptr<Suppressions> supprs)
114114
{
115115
mFiles.clear();
116+
mFileSettings.clear();
116117
mSettings = settings; // this is a copy
117118
mSuppressions = std::move(supprs);
118119
}
119120

120-
void CheckThread::analyseWholeProgram(const std::list<FileWithDetails> &files, const std::string& ctuInfo)
121+
void CheckThread::analyseWholeProgram(const std::list<FileWithDetails> &files, const std::list<FileSettings> &fileSettings, const std::string& ctuInfo)
121122
{
122123
mFiles = files;
124+
mFileSettings = fileSettings;
123125
mAnalyseWholeProgram = true;
124126
mCtuInfo = ctuInfo;
125127
start();
@@ -136,8 +138,9 @@ void CheckThread::run()
136138
std::string ctuInfo;
137139
ctuInfo.swap(mCtuInfo);
138140
qDebug() << "Whole program analysis";
139-
cppcheck.analyseWholeProgram(mSettings.buildDir, mFiles, {}, ctuInfo);
141+
cppcheck.analyseWholeProgram(mSettings.buildDir, mFiles, mFileSettings, ctuInfo);
140142
mFiles.clear();
143+
mFileSettings.clear();
141144
emit done();
142145
return;
143146
}

‎gui/checkthread.h‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ class CheckThread : public QThread {
6969

7070
/**
7171
* @brief Run whole program analysis
72-
* @param files All files
73-
* @param ctuInfo Ctu info for addons
72+
* @param files All files
73+
* @param fileSettings All files of the project
74+
* @param ctuInfo Ctu info for addons
7475
*/
75-
void analyseWholeProgram(const std::list<FileWithDetails> &files, const std::string& ctuInfo);
76+
void analyseWholeProgram(const std::list<FileWithDetails> &files, const std::list<FileSettings> &fileSettings, const std::string& ctuInfo);
7677

7778
void setAddonsAndTools(const QStringList &addonsAndTools) {
7879
mAddonsAndTools = addonsAndTools;
@@ -153,6 +154,7 @@ class CheckThread : public QThread {
153154
bool isSuppressed(const SuppressionList::ErrorMessage &errorMessage) const;
154155

155156
std::list<FileWithDetails> mFiles;
157+
std::list<FileSettings> mFileSettings;
156158
bool mAnalyseWholeProgram{};
157159
std::string mCtuInfo;
158160
QStringList mAddonsAndTools;

0 commit comments

Comments
 (0)