From 07f393e96426dec1592291f68d1796ccbe6c40dd Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Sun, 8 Feb 2009 14:51:22 +0100 Subject: Fix gcc-4.4.0 compilation --- common/strutils.c | 4 ++-- common/treepathutils.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/strutils.c b/common/strutils.c index ffd95c3..5383b8a 100644 --- a/common/strutils.c +++ b/common/strutils.c @@ -74,7 +74,7 @@ char* extract_file_name(const char *APath) { if (APath == NULL) return NULL; // log("xxx = %s\n", (APath + strlen(APath) - 1)); - char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / ) + const char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / ) if (file_part == NULL) return NULL; return strdup(file_part + 1); } @@ -84,7 +84,7 @@ char* extract_file_path(const char *APath) { if (APath == NULL) return NULL; // log("xxx = %s\n", (APath + strlen(APath) - 1)); - char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / ) + const char *file_part = rindex(APath, 0x2f); // returns NULL if not found or if the file is in the root ( / ) if (file_part == NULL) return NULL; char *ANewPath = (char*)malloc(file_part - APath + 2); snprintf(ANewPath, file_part - APath + 2, "%s", APath); diff --git a/common/treepathutils.c b/common/treepathutils.c index 2e43f94..c8f2b18 100644 --- a/common/treepathutils.c +++ b/common/treepathutils.c @@ -191,7 +191,7 @@ unsigned long int filelist_find_index_by_path(struct PathTree *tree, const char void filelist_tree_add_item_recurr(struct PathTree *tree, const char *path, const char *original_pathstr, struct TVFSItem *item, unsigned long index) { - char *pos = strstr(path, "/"); + const char *pos = strstr(path, "/"); char *first_part; char *last_part; if (pos) { -- cgit v1.2.3