Skip to content

Commit

Permalink
%d in format string (no. 2) requires 'int' but the argument type is '…
Browse files Browse the repository at this point in the history
…unsigned int'
  • Loading branch information
escherstair authored and Pro committed Sep 3, 2019
1 parent 74b03a8 commit 3ec05f5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/fuzz/ua_debug_dump_pkgs_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,15 @@ UA_debug_dumpCompleteChunk(UA_Server *const server, UA_Connection *const connect
}

char fileName[250];
snprintf(fileName, sizeof(fileName), "%s/%05d_%s%s", UA_CORPUS_OUTPUT_DIR, ++UA_dump_chunkCount,
snprintf(fileName, sizeof(fileName), "%s/%05u_%s%s", UA_CORPUS_OUTPUT_DIR, ++UA_dump_chunkCount,
dump_filename.messageType ? dump_filename.messageType : "", dump_filename.serviceName);

char dumpOutputFile[266];
snprintf(dumpOutputFile, 255, "%s.bin", fileName);
// check if file exists and if yes create a counting filename to avoid overwriting
unsigned cnt = 1;
while ( access( dumpOutputFile, F_OK ) != -1 ) {
snprintf(dumpOutputFile, 266, "%s_%d.bin", fileName, cnt);
snprintf(dumpOutputFile, 266, "%s_%u.bin", fileName, cnt);
cnt++;
}

Expand Down

0 comments on commit 3ec05f5

Please sign in to comment.