summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Bigliardi <shammash@artha.org>2009-10-03 18:30:52 (GMT)
committer Luca Bigliardi <shammash@artha.org>2009-10-03 18:31:39 (GMT)
commit4cd443a9e7f3aabe6f850c063bb8523506722d00 (patch)
treee194ba3314e0d97095b02665e4bdbc7516ccaecd
parent9ab054b813264e2e3988ee7409a8b62061a49e0d (diff)
More const char warnings fixes
Signed-off-by: Luca Bigliardi <shammash@artha.org>
-rw-r--r--src/jutils.h2
-rw-r--r--src/muse.cpp6
-rw-r--r--src/out_vorbis.cpp2
-rw-r--r--src/outchannels.cpp2
-rw-r--r--src/outchannels.h2
-rw-r--r--src/pipe.cpp4
-rw-r--r--src/pipe.h6
7 files changed, 12 insertions, 12 deletions
diff --git a/src/jutils.h b/src/jutils.h
index 122a790..0fbb9c0 100644
--- a/src/jutils.h
+++ b/src/jutils.h
@@ -43,7 +43,7 @@ extern "C" {
*/
#define CHAR_SET(func,var) \
char var[MAX_VALUE_SIZE]; \
-void func(char *in) { \
+void func(const char *in) { \
if(strncmp(var,in,MAX_VALUE_SIZE)==0) return; \
else strncpy(var,in,MAX_VALUE_SIZE); \
} \
diff --git a/src/muse.cpp b/src/muse.cpp
index 02c4707..6d23faa 100644
--- a/src/muse.cpp
+++ b/src/muse.cpp
@@ -122,10 +122,10 @@
/* command line stuff */
-char *version =
+const char *version =
"%s version %s http://muse.dyne.org";
-char *help =
+const char *help =
"Usage: muse [generic options] [-e [encoder options] [stream options] ] [files]\n"
":: generic options:\n"
" -h --help this help\n"
@@ -190,7 +190,7 @@ static const struct option long_options[] = {
{ 0, 0, 0, 0 }
};
-char *short_options = "-hvD:ioCN:V:S:P:e:b:r:q:c:f:g:s:m:l:U:p:n:u:d:";
+const char *short_options = "-hvD:ioCN:V:S:P:e:b:r:q:c:f:g:s:m:l:U:p:n:u:d:";
/* misc settings */
#define MAX_CLI_CHARS 9182
diff --git a/src/out_vorbis.cpp b/src/out_vorbis.cpp
index 52e3be5..4b6fb80 100644
--- a/src/out_vorbis.cpp
+++ b/src/out_vorbis.cpp
@@ -261,7 +261,7 @@ bool OutVorbis::apply_profile() {
char tmp[128];
sprintf(tmp,"%s version %s",PACKAGE,VERSION);
vorbis_comment_init(&vc);
- vorbis_comment_add_tag(&vc,"Streamed with",tmp);
+ vorbis_comment_add_tag(&vc,(char *)"Streamed with",tmp);
}
/* Now, build the three header packets and send through to the stream
diff --git a/src/outchannels.cpp b/src/outchannels.cpp
index 100ac52..67adc4e 100644
--- a/src/outchannels.cpp
+++ b/src/outchannels.cpp
@@ -58,7 +58,7 @@
/* mp3 encoder */
-OutChannel::OutChannel(char *myname)
+OutChannel::OutChannel(const char *myname)
: Entry() {
func("OutChannel::OutChannel(%s) %p",myname,this);
diff --git a/src/outchannels.h b/src/outchannels.h
index d585c03..edb16d8 100644
--- a/src/outchannels.h
+++ b/src/outchannels.h
@@ -92,7 +92,7 @@ class OutChannel: public Entry {
@brief the OutChannel class constructor
@param myname given at creation by Stream_mixer
*/
- OutChannel(char *myname);
+ OutChannel(const char *myname);
virtual ~OutChannel(); ///< the OutChannel class destructor
diff --git a/src/pipe.cpp b/src/pipe.cpp
index aeeb5f5..e9b11db 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -101,7 +101,7 @@ static struct pipe_copy_list callbacks[] = {
end is a pointer to the last character to go out
*/
-bool Pipe::set_input_type(char *name) {
+bool Pipe::set_input_type(const char *name) {
int c;
for(c=0 ; callbacks[c].callback ; c++) {
if(strcasecmp(name,callbacks[c].name)==0) {
@@ -113,7 +113,7 @@ bool Pipe::set_input_type(char *name) {
return false;
}
-bool Pipe::set_output_type(char *name) {
+bool Pipe::set_output_type(const char *name) {
int c;
for(c=0 ; callbacks[c].callback ; c++) {
if(strcasecmp(name,callbacks[c].name)==0) {
diff --git a/src/pipe.h b/src/pipe.h
index 2e64fb0..d4f678e 100644
--- a/src/pipe.h
+++ b/src/pipe.h
@@ -75,7 +75,7 @@ typedef void (pipe_copy_f)(void *src, void *dst, int samples);
/** this is the prototype struct holding the list of available types */
struct pipe_copy_list {
- char *name;
+ const char *name;
pipe_copy_f *callback;
int src_samplesize;
int dst_samplesize;
@@ -113,9 +113,9 @@ public:
* mix_int16_to_int32 simple sum of 16bit over 32bit int
*/
- bool set_input_type(char *name);
+ bool set_input_type(const char *name);
///< set the input conversion type for this Pipe
- bool set_output_type(char *name);
+ bool set_output_type(const char *name);
///< set the output conversion type for this Pipe
void set_block(bool input, bool output);