Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FunkyFr3sh committed Oct 23, 2024
1 parent 729ac2e commit e8977c1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/genpatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,12 @@ int genpatch(int argc, char** argv)
else
{
static char path[MAX_PATH];
FAIL_IF(_snprintf(path, sizeof(path) - 1, "%s-patch.cpp", argv[1]) < 0, "Fail - Path1 truncated\n");
FAIL_IF(snprintf(path, sizeof(path) - 1, "%s-patch.cpp", argv[1]) < 0, "Fail - Path1 truncated\n");

ofh1 = fopen(path, "w");
FAIL_IF_PERROR(ofh1 == NULL, "%s");

FAIL_IF(_snprintf(path, sizeof(path) - 1, "%s-patch.cpp", argv[2]) < 0, "Fail - Path2 truncated\n");
FAIL_IF(snprintf(path, sizeof(path) - 1, "%s-patch.cpp", argv[2]) < 0, "Fail - Path2 truncated\n");

ofh2 = fopen(path, "w");
FAIL_IF_PERROR(ofh2 == NULL, "%s");
Expand Down Expand Up @@ -184,8 +184,8 @@ int genpatch(int argc, char** argv)
if (length1 != length2)
{
char s[] = "\n//WARNING: file1 size does not match file2 size\n";
fprintf(ofh1, s);
fprintf(ofh2, s);
fprintf(ofh1, "%s", s);
fprintf(ofh2, "%s", s);
}

if (ignored > 0)
Expand Down

0 comments on commit e8977c1

Please sign in to comment.