Skip to content

Commit

Permalink
cppcheck: Quiet bad "sscanf format string wrong number of arguments" …
Browse files Browse the repository at this point in the history
…warning in mheg.

The right number of arguments are present, they just aren't being
parsed by cppcheck because they use the SCNd64 macro to get the
correct per platform format argument.
  • Loading branch information
linuxdude42 committed Oct 2, 2020
1 parent 5ba8d18 commit 1b72368
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/mheg/netstream.cpp
Expand Up @@ -329,6 +329,7 @@ static qlonglong inline ContentRange(const QNetworkReply *reply,
// See RFC 2616 14.16: 'bytes begin-end/size'
qulonglong len = 0;
const char *fmt = " bytes %20" SCNd64 " - %20" SCNd64 " / %20" SCNd64;
// cppcheck-suppress wrongPrintfScanfArgNum
if (3 != std::sscanf(range.constData(), fmt, &first, &last, &len))
{
LOG(VB_GENERAL, LOG_ERR, LOC + QString("Invalid Content-Range:'%1'")
Expand Down

0 comments on commit 1b72368

Please sign in to comment.