Skip to content

Commit 03464d3

Browse files
authored
Fix gcc 15.2 compile error (#150)
src/lib/editorconfig.c:291:23: error: initialization discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers] 291 | char* path_char = strrchr(absolute_path, '/');
1 parent 750c39e commit 03464d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/editorconfig.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ static int ini_handler(void* hfp, const char* section, const char* name,
288288
static int split_file_path(char** directory, char** filename,
289289
const char* absolute_path)
290290
{
291-
char* path_char = strrchr(absolute_path, '/');
291+
const char* path_char = strrchr(absolute_path, '/');
292292

293293
if (path_char == NULL) {
294294
if (directory)

0 commit comments

Comments
 (0)