Fix missing type casting.

This commit is contained in:
2018-02-11 03:02:45 +01:00
parent 0746e81a98
commit bdf9855393
3 changed files with 6 additions and 6 deletions

2
.gitignore vendored
View File

@@ -19,5 +19,5 @@ VisualStudio/filesync/x64/*
*.ilk *.ilk
*.VC.db *.VC.db
*.VC.opendb *.VC.opendb
tests/tmp/* tests/*
.vs .vs

View File

@@ -17,7 +17,7 @@ FileNode FileNode_Create() {
FileNode nodes; FileNode nodes;
int i; int i;
// Allocate a block // Allocate a block
nodes = malloc(sizeof(TFileNode) * FileNode_Block); nodes = (FileNode)malloc(sizeof(TFileNode) * FileNode_Block);
if (nodes == NULL) { if (nodes == NULL) {
return NULL; return NULL;
} }
@@ -294,7 +294,7 @@ FileNode FileNode_LoadNode(FILE *file) {
fread((void *)&fileNode->flags, sizeof(fileNode->flags), 1, file); fread((void *)&fileNode->flags, sizeof(fileNode->flags), 1, file);
// Read status // Read status
fileNode->status = fgetc(file); fileNode->status = (FileStatus)fgetc(file);
// Read status // Read status
if (fileNode->flags & FileFlag_HasSize) { if (fileNode->flags & FileFlag_HasSize) {
@@ -459,7 +459,7 @@ FileNode FileNode_Build(char *path) {
int FileNode_Build_Iterate(char *path, char *name, void *d) { int FileNode_Build_Iterate(char *path, char *name, void *d) {
FileNode fileNode; FileNode fileNode;
FileNode fileNodeParent = d; FileNode fileNodeParent = (FileNode)d;
if (!strcmp(name, FileNode_Filename)) { if (!strcmp(name, FileNode_Filename)) {
return (0); return (0);
@@ -565,7 +565,7 @@ FileNode FileNode_Refresh(FileNode fileNode, char *filePath) {
} }
int FileNode_Refresh_Iterate(char *path, char *name, void *d) { int FileNode_Refresh_Iterate(char *path, char *name, void *d) {
FileNode fileNode = d; FileNode fileNode = (FileNode)d;
FileNode fileNodeChild; FileNode fileNodeChild;
if (!strcmp(name, FileNode_Filename)) { if (!strcmp(name, FileNode_Filename)) {

View File

@@ -386,7 +386,7 @@ int File_Copy(const char *pathOrig, const char *pathDest) {
goto cleanup; goto cleanup;
} }
buffer = malloc(sizeof(char) * MaxBuffer); buffer = (char *)malloc(sizeof(char) * MaxBuffer);
if (buffer == NULL) { if (buffer == NULL) {
goto cleanup; goto cleanup;
} }