-Wextra warnings fixed
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
#include "../String/StringBuilder.h"
|
||||
#include "io_includes.h"
|
||||
|
||||
kt_define(FileHandle, (freeMembers_t)file_close, NULL)
|
||||
void __file_freeMembers(void* _f){ fclose((FileHandle)_f); }
|
||||
|
||||
kt_define(FileHandle, __file_freeMembers, NULL)
|
||||
|
||||
bool file_exists(const char* path){
|
||||
if(path[0]=='.'){
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "filesystem.h"
|
||||
|
||||
char* __path_concat(u16 n, ...){
|
||||
char* __path_concat(u32 n, ...){
|
||||
char** parts=(char**)malloc(n*sizeof(char*));
|
||||
u32* lengths=malloc(n*sizeof(u32));
|
||||
u32 totalLength=0;
|
||||
@@ -56,9 +56,9 @@ Maybe path_throwIfEscapes(const char* path){
|
||||
|
||||
char* path_parentDir(char* dir){
|
||||
char* copy=cptr_copy(dir);
|
||||
u32 length=cptr_length(copy);
|
||||
i32 length=cptr_length(copy);
|
||||
i32 i=cptr_lastIndexOfChar(copy,path_sep);
|
||||
if(i==length-1){
|
||||
if(i!=-1 && i==length-1){
|
||||
copy[length-1]=0;
|
||||
i=cptr_lastIndexOfChar(copy,path_sep);
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ static const char path_sep='/';
|
||||
static const char path_notSep='\\';
|
||||
#endif
|
||||
|
||||
char* __path_concat(u16 n, ...);
|
||||
char* __path_concat(u32 n, ...);
|
||||
/// @brief merges path parts together and puts <path_sep> between them
|
||||
/// @return new cstr
|
||||
#define path_concat(PATH_PARTS...) __path_concat(count_args(PATH_PARTS), PATH_PARTS)
|
||||
|
||||
Reference in New Issue
Block a user