Skip to content

Commit

Permalink
Silence some cppcheck false positives in qtermwidget
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Apr 18, 2023
1 parent 65d822e commit b94f9b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/plugins/grass/qtermwidget/BlockArray.cpp
Expand Up @@ -276,6 +276,7 @@ void BlockArray::decreaseBuffer(size_t newsize)

FILE * fion = fdopen(dup(ion), "w+b");
if (!fion) {
// cppcheck-suppress uninitdata
delete [] buffer1;
perror("fdopen/dup");
return;
Expand Down Expand Up @@ -334,7 +335,9 @@ void BlockArray::increaseBuffer()
FILE * fion = fdopen(dup(ion), "w+b");
if (!fion) {
perror("fdopen/dup");
// cppcheck-suppress uninitdata
delete [] buffer1;
// cppcheck-suppress uninitdata
delete [] buffer2;
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/grass/qtermwidget/kptydevice.h
Expand Up @@ -252,8 +252,8 @@ class KRingBuffer
buffers.back().resize(tail);
QByteArray tmp;
tmp.resize(qMax(CHUNKSIZE, bytes));
ptr = tmp.data();
buffers.push_back(tmp);
ptr = buffers.back().data();
tail = bytes;
}
return ptr;
Expand Down

0 comments on commit b94f9b9

Please sign in to comment.