From 4c8dd29935945cffa042d3d58e75c8cb690c2760 Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Tue, 6 Aug 2019 17:02:28 +0100 Subject: [PATCH] [misc] silence more Coverity false positives * "Show me static analysis framework that only triples my work and I will kiss its feet." --- src/icon.c | 2 ++ src/parser.c | 4 ++++ src/rufus.rc | 10 +++++----- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/icon.c b/src/icon.c index 9f30d1b8..b717cd02 100644 --- a/src/icon.c +++ b/src/icon.c @@ -177,7 +177,9 @@ BOOL SetAutorun(const char* path) GetWindowTextW(hLabel, wlabel, ARRAYSIZE(wlabel)); GetWindowTextW(hMainDialog, wRufusVersion, ARRAYSIZE(wRufusVersion)); + // coverity[invalid_type] fwprintf_s(fd, L"; Created by %s\n; " LTEXT(RUFUS_URL) L"\n", wRufusVersion); + // coverity[invalid_type] fwprintf_s(fd, L"[autorun]\nicon = autorun.ico\nlabel = %s\n", wlabel); fclose(fd); uprintf("Created: %s", filename); diff --git a/src/parser.c b/src/parser.c index fd14b3a9..1526b6a8 100644 --- a/src/parser.c +++ b/src/parser.c @@ -782,12 +782,14 @@ char* set_token_data_file(const char* token, const char* data, const char* filen fputws(buf, fd_out); // Now output the new data + // coverity[invalid_type] fwprintf_s(fd_out, L"%s\n", wdata); ret = (char*)data; } if (ret == NULL) { // Didn't find an existing token => append it + // coverity[invalid_type] fwprintf_s(fd_out, L"%s = %s\n", wtoken, wdata); ret = (char*)data; } @@ -1039,6 +1041,7 @@ char* insert_section_data(const char* filename, const char* section, const char* // Section was found, output it fputws(buf, fd_out); // Now output the new data + // coverity[invalid_type] fwprintf_s(fd_out, L"%s\n", wdata); ret = (char*)data; } @@ -1194,6 +1197,7 @@ char* replace_in_token_data(const char* filename, const char* token, const char* i = (torep-buf) + wcslen(wsrc); *torep = 0; + // coverity[invalid_type] fwprintf_s(fd_out, L"%s%s%s", buf, wrep, &buf[i]); ret = (char*)rep; } diff --git a/src/rufus.rc b/src/rufus.rc index 42bce0f0..c85c5406 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.7.1556" +CAPTION "Rufus 3.7.1557" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -394,8 +394,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,7,1556,0 - PRODUCTVERSION 3,7,1556,0 + FILEVERSION 3,7,1557,0 + PRODUCTVERSION 3,7,1557,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -413,13 +413,13 @@ BEGIN VALUE "Comments", "https://akeo.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.7.1556" + VALUE "FileVersion", "3.7.1557" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus-3.7.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.7.1556" + VALUE "ProductVersion", "3.7.1557" END END BLOCK "VarFileInfo"