From 1a948849f3bdc3875bfb520d4ec742b8cd5018a4 Mon Sep 17 00:00:00 2001 From: Dani Martin <32535596+danimartin82@users.noreply.github.com> Date: Mon, 30 Mar 2020 17:08:01 +0200 Subject: [cppcheck] Fix minor warnings in models.c and raudio.c (#1162) Errores fixes: models.c,2843 Either the condition 'fileData!=NULL' is redundant or there is possible null pointer dereference: fileData. raudio.c,805, 806, 807, 808, %d in format string (no. 2) requires 'int' but the argument type is 'unsigned int'. --- src/models.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/models.c') diff --git a/src/models.c b/src/models.c index b4a7eaef..69d78560 100644 --- a/src/models.c +++ b/src/models.c @@ -2840,10 +2840,10 @@ static Model LoadOBJ(const char *fileName) unsigned int materialCount = 0; char *fileData = LoadFileText(fileName); - int dataSize = strlen(fileData); if (fileData != NULL) { + int dataSize = strlen(fileData); char currentDir[1024] = { 0 }; strcpy(currentDir, GetWorkingDirectory()); chdir(GetDirectoryPath(fileName)); -- cgit v1.2.3