[misc] silence more Coverity false positives

* "Show me static analysis framework that only triples my work and I will kiss its feet."
This commit is contained in:
Pete Batard 2019-08-06 17:02:28 +01:00
parent 84427d12dd
commit 4c8dd29935
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 11 additions and 5 deletions

View file

@ -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;
}