Skip to content

Commit

Permalink
Cleanup compiler warnings for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
ColtonWilley committed Dec 11, 2024
1 parent 2d30cee commit 5763207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/add_cert_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static CK_RV load_cert(char* filename, unsigned char **certData,
}
if (ret == 0) {
XFSEEK(file, 0, XSEEK_END);
len = XFTELL(file);
len = (int)XFTELL(file);
if (len == 0) {
fprintf(stderr, "File: %s is empty\n", filename);
ret = 1;
Expand All @@ -172,7 +172,7 @@ static CK_RV load_cert(char* filename, unsigned char **certData,
}
}
if (ret == 0) {
buffer = XMALLOC(len + 1, NULL, DYNAMIC_TYPE_FILE);
buffer = (unsigned char *)XMALLOC(len + 1, NULL, DYNAMIC_TYPE_FILE);
if (buffer == NULL) {
fprintf(stderr, "Malloc error on %d bytes\n", len);
ret = 1;
Expand Down

0 comments on commit 5763207

Please sign in to comment.