Skip to content

Commit 5763207

Browse files
committed
Cleanup compiler warnings for clang
1 parent 2d30cee commit 5763207

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/add_cert_file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ static CK_RV load_cert(char* filename, unsigned char **certData,
159159
}
160160
if (ret == 0) {
161161
XFSEEK(file, 0, XSEEK_END);
162-
len = XFTELL(file);
162+
len = (int)XFTELL(file);
163163
if (len == 0) {
164164
fprintf(stderr, "File: %s is empty\n", filename);
165165
ret = 1;
@@ -172,7 +172,7 @@ static CK_RV load_cert(char* filename, unsigned char **certData,
172172
}
173173
}
174174
if (ret == 0) {
175-
buffer = XMALLOC(len + 1, NULL, DYNAMIC_TYPE_FILE);
175+
buffer = (unsigned char *)XMALLOC(len + 1, NULL, DYNAMIC_TYPE_FILE);
176176
if (buffer == NULL) {
177177
fprintf(stderr, "Malloc error on %d bytes\n", len);
178178
ret = 1;

0 commit comments

Comments
 (0)