fill_metadata_from_path modifies a "const" argument

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sat, 2 May 2026 20:56:37 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 3eba3ecd179fc1196b34babd4e8530b83972dbb2
Author: Solomon Peachy <[email protected]>
Date:   Sat May 2 20:41:28 2026 -0400

    fill_metadata_from_path modifies a "const" argument
    
    ...so convert the argument to non-const
    
    Change-Id: I9e04d817e8674facae7c3be234fd9756f1a4f8ad

diff --git a/lib/rbcodec/metadata/metadata.c b/lib/rbcodec/metadata/metadata.c
index fafd227c14..9dbb76e2a9 100644
--- a/lib/rbcodec/metadata/metadata.c
+++ b/lib/rbcodec/metadata/metadata.c
@@ -381,7 +381,7 @@ bool format_buffers_with_offset(int afmt)
 /* Simple file type probing by looking at the filename extension. */
 unsigned int probe_file_format(const char *filename)
 {
-    char *suffix;
+    const char *suffix;
     unsigned int i;
 
     suffix = strrchr(filename, '.');
@@ -418,7 +418,7 @@ unsigned int probe_file_format(const char *filename)
  * file that would prevent playback. supply a filedescriptor <0 and the file will be opened
  * and closed automatically within the get_metadata call
  * get_metadata_ex allows flags to change the way get_metadata behaves
- * METADATA_EXCLUDE_ID3_PATH  won't copy filename path to the id3 path buffer 
+ * METADATA_EXCLUDE_ID3_PATH  won't copy filename path to the id3 path buffer
  * METADATA_CLOSE_FD_ON_EXIT closes the open filedescriptor on exit
  */
 bool get_metadata_ex(struct mp3entry* id3, int fd, const char* trackname, int flags)
@@ -546,7 +546,7 @@ void wipe_mp3entry(struct mp3entry *id3)
 }
 
 /* Glean what is possible from the filename alone - does not parse metadata */
-void fill_metadata_from_path(struct mp3entry *id3, const char *trackname)
+void fill_metadata_from_path(struct mp3entry *id3, char *trackname)
 {
     char *p;
 
diff --git a/lib/rbcodec/metadata/metadata.h b/lib/rbcodec/metadata/metadata.h
index a48afee004..45ac054726 100644
--- a/lib/rbcodec/metadata/metadata.h
+++ b/lib/rbcodec/metadata/metadata.h
@@ -335,7 +335,7 @@ void adjust_mp3entry(struct mp3entry *entry, void *dest, const void *orig);
 void copy_mp3entry(struct mp3entry *dest, const struct mp3entry *orig);
 void wipe_mp3entry(struct mp3entry *id3);
 
-void fill_metadata_from_path(struct mp3entry *id3, const char *trackname);
+void fill_metadata_from_path(struct mp3entry *id3, char *trackname);
 int get_audio_base_codec_type(int type);
 const char * get_codec_string(int type);
 bool rbcodec_format_is_atomic(int afmt);
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs