From 1b723681cc700421859487c4225bfe8dde18227d Mon Sep 17 00:00:00 2001 From: David Hampton Date: Mon, 28 Sep 2020 13:14:25 -0400 Subject: [PATCH] cppcheck: Quiet bad "sscanf format string wrong number of arguments" 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. --- mythtv/libs/libmythtv/mheg/netstream.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mythtv/libs/libmythtv/mheg/netstream.cpp b/mythtv/libs/libmythtv/mheg/netstream.cpp index b023a4cb543..8a6f280f8c6 100644 --- a/mythtv/libs/libmythtv/mheg/netstream.cpp +++ b/mythtv/libs/libmythtv/mheg/netstream.cpp @@ -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'")