From 0b48faf035ac9fdd1a99d87cfe7b0451e47fb1dc Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 2 Jan 2008 16:14:19 +0000 Subject: [PATCH] Avoid compiler warnings: "warning: deprecated conversion from string constant to 'char*\" and similar. --- src/common/common.cpp | 2 +- src/common/mm_io.cpp | 2 +- src/common/wavpack_common.cpp | 2 +- src/extract/xtr_avi.cpp | 2 +- src/info/matroska.xpm | 2 +- src/mmg/matroskalogo.xpm | 2 +- src/mmg/tab_input.cpp | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/common/common.cpp b/src/common/common.cpp index 915847104..408b9ab84 100644 --- a/src/common/common.cpp +++ b/src/common/common.cpp @@ -1347,7 +1347,7 @@ mxmsg(int level, va_list ap) { string new_fmt, output; bool nl; - char *prefix; + const char *prefix; fix_format(fmt, new_fmt); diff --git a/src/common/mm_io.cpp b/src/common/mm_io.cpp index 8445314d6..fa0b2bafa 100644 --- a/src/common/mm_io.cpp +++ b/src/common/mm_io.cpp @@ -63,7 +63,7 @@ mm_file_io_c::mm_file_io_c(const string &path, file_name(path) { string local_path; - char *cmode; + const char *cmode; struct stat st; # if HAVE_POSIX_FADVISE int advise; diff --git a/src/common/wavpack_common.cpp b/src/common/wavpack_common.cpp index b2cfe116b..0235d0fce 100644 --- a/src/common/wavpack_common.cpp +++ b/src/common/wavpack_common.cpp @@ -26,7 +26,7 @@ const uint32_t sample_rates [] = { static void little_endian_to_native(void *data, - char *format) { + const char *format) { uint8_t *cp = (uint8_t *)data; uint32_t temp; diff --git a/src/extract/xtr_avi.cpp b/src/extract/xtr_avi.cpp index c4be05a27..5c1aad2f8 100644 --- a/src/extract/xtr_avi.cpp +++ b/src/extract/xtr_avi.cpp @@ -96,7 +96,7 @@ xtr_avi_c::handle_frame(memory_cptr &frame, nfr = irnd((double)duration / 1000000.0 * fps / 1000.0); for (k = 2; k <= nfr; k++) - AVI_write_frame(avi, "", 0, 0); + AVI_write_frame(avi, NULL, 0, 0); } } diff --git a/src/info/matroska.xpm b/src/info/matroska.xpm index c83d33f3d..c58fa86cc 100644 --- a/src/info/matroska.xpm +++ b/src/info/matroska.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * matroska_xpm[] = { +static const char * matroska_xpm[] = { "32 32 160 2", " c None", ". c #121212", diff --git a/src/mmg/matroskalogo.xpm b/src/mmg/matroskalogo.xpm index 49977e1a1..a180aeeb5 100644 --- a/src/mmg/matroskalogo.xpm +++ b/src/mmg/matroskalogo.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * matroskalogo_xpm[] = { +static const char * matroskalogo_xpm[] = { "32 32 262 2", " c None", ". c #FFFFFF", diff --git a/src/mmg/tab_input.cpp b/src/mmg/tab_input.cpp index fae725d14..f102e947f 100644 --- a/src/mmg/tab_input.cpp +++ b/src/mmg/tab_input.cpp @@ -216,7 +216,7 @@ tab_input::set_track_mode(mmg_track_t *t) { void tab_input::select_file(bool append) { - static struct { wxChar *title, *extensions; } file_types[] = { + static struct { const wxChar *title, *extensions; } file_types[] = { { wxT("A/52 (aka AC3)"), wxT("ac3") }, { wxT("AAC (Advanced Audio Coding)"), wxT("aac m4a mp4") }, { wxT("AVC/h.264 elementary streams"), wxT("264 avc h264 x264") },