[vlc-devel] commit: galaktos: fix a buch of anoying warnings. ( Rémi Duraffort )

git version control git at videolan.org
Sun Jan 25 15:27:58 CET 2009


vlc | branch: master | Rémi Duraffort <ivoire at videolan.org> | Sun Jan 25 15:25:31 2009 +0100| [64d1e176b010a03b6538de748db0dfc4d023fd99] | committer: Rémi Duraffort 

galaktos: fix a buch of anoying warnings.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=64d1e176b010a03b6538de748db0dfc4d023fd99
---

 modules/visualization/galaktos/func.c      |    4 +-
 modules/visualization/galaktos/func.h      |    4 +-
 modules/visualization/galaktos/param.c     |   36 ++++++++++++++--------------
 modules/visualization/galaktos/param.h     |    8 +++---
 modules/visualization/galaktos/splaytree.c |    2 +-
 modules/visualization/galaktos/splaytree.h |    2 +-
 6 files changed, 28 insertions(+), 28 deletions(-)

diff --git a/modules/visualization/galaktos/func.c b/modules/visualization/galaktos/func.c
index 0aecd65..73aa95f 100644
--- a/modules/visualization/galaktos/func.c
+++ b/modules/visualization/galaktos/func.c
@@ -38,7 +38,7 @@ void * copy_func_key(char * string) {
 }	
 
 
-func_t * create_func (char * name, double (*func_ptr)(), int num_args) {
+func_t * create_func (const char * name, double (*func_ptr)(), int num_args) {
 
   func_t * func;
   func = (func_t*)malloc(sizeof(func_t));
@@ -137,7 +137,7 @@ int compare_func(char * name, char * name2) {
 }
 
 /* Loads a builtin function */
-int load_builtin_func(char * name,  double (*func_ptr)(), int num_args) {
+int load_builtin_func(const char * name,  double (*func_ptr)(), int num_args) {
 
   func_t * func; 
   int retval; 
diff --git a/modules/visualization/galaktos/func.h b/modules/visualization/galaktos/func.h
index e83acd9..422012d 100644
--- a/modules/visualization/galaktos/func.h
+++ b/modules/visualization/galaktos/func.h
@@ -2,13 +2,13 @@
 #define FUNC_H
 
 /* Public Prototypes */
-func_t * create_func (char * name, double (*func_ptr)(), int num_args);
+func_t * create_func (const char * name, double (*func_ptr)(), int num_args);
 int remove_func(func_t * func);
 func_t * find_func(char * name);
 int init_builtin_func_db();
 int destroy_builtin_func_db();
 int load_all_builtin_func();
-int load_builtin_func(char * name, double (*func_ptr)(), int num_args);
+int load_builtin_func(const char * name, double (*func_ptr)(), int num_args);
 void free_func(func_t * func);
 
 #endif
diff --git a/modules/visualization/galaktos/param.c b/modules/visualization/galaktos/param.c
index 5565400..784d235 100644
--- a/modules/visualization/galaktos/param.c
+++ b/modules/visualization/galaktos/param.c
@@ -53,25 +53,25 @@ int is_valid_param_string(char * string); /* true if string is valid variable or
 /* A splay tree of builtin parameters */
 splaytree_t * builtin_param_tree = NULL;
 
-int insert_param_alt_name(param_t * param, char * alt_name);
+int insert_param_alt_name(param_t * param, const char * alt_name);
 
 int insert_builtin_param(param_t * param);
 
 /* Private function prototypes */
 int compare_param(char * name, char * name2);
 
-int load_builtin_param_double(char * name, void * engine_val, void * matrix, short int flags, 
-								double init_val, double upper_bound, double lower_bound, char * alt_name);
+int load_builtin_param_double(const char * name, void * engine_val, void * matrix, short int flags,
+								double init_val, double upper_bound, double lower_bound, const char * alt_name);
 
-int load_builtin_param_int(char * name, void * engine_val, short int flags, 
-								int init_val, int upper_bound, int lower_bound, char * alt_name);
+int load_builtin_param_int(const char * name, void * engine_val, short int flags,
+								int init_val, int upper_bound, int lower_bound, const char * alt_name);
 								
-int load_builtin_param_bool(char * name, void * engine_val, short int flags, 
-								int init_val, char * alt_name);
+int load_builtin_param_bool(const char * name, void * engine_val, short int flags,
+								int init_val, const char * alt_name);
 								
 								
 								
-param_t * create_param (char * name, short int type, short int flags, void * engine_val, void * matrix,
+param_t * create_param (const char * name, short int type, short int flags, void * engine_val, void * matrix,
 							value_t default_init_val, value_t upper_bound, value_t lower_bound) {
 
   param_t * param = NULL;
@@ -179,7 +179,7 @@ int destroy_builtin_param_db() {
 
 
 /* Insert a parameter into the database with an alternate name */
-int insert_param_alt_name(param_t * param, char * alt_name) {
+int insert_param_alt_name(param_t * param, const char * alt_name) {
   
   if (param == NULL)
     return ERROR;
@@ -408,8 +408,8 @@ void free_param(param_t * param) {
 }
 
 /* Loads a double parameter into the builtin database */
-int load_builtin_param_double(char * name, void * engine_val, void * matrix, short int flags, 
-						double init_val, double upper_bound, double lower_bound, char * alt_name) {
+int load_builtin_param_double(const char * name, void * engine_val, void * matrix, short int flags, 
+						double init_val, double upper_bound, double lower_bound, const char * alt_name) {
 
   param_t * param = NULL;
   value_t iv, ub, lb;
@@ -466,7 +466,7 @@ int load_builtin_param_double(char * name, void * engine_val, void * matrix, sho
 
 
 /* Loads a double parameter into the builtin database */
-param_t * new_param_double(char * name, short int flags, void * engine_val, void * matrix,
+param_t * new_param_double(const char * name, short int flags, void * engine_val, void * matrix,
 						double upper_bound, double lower_bound, double init_val) {
 
   param_t * param;
@@ -486,7 +486,7 @@ param_t * new_param_double(char * name, short int flags, void * engine_val, void
 
 
 /* Creates a new parameter of type int */
-param_t * new_param_int(char * name, short int flags, void * engine_val,
+param_t * new_param_int(const char * name, short int flags, void * engine_val,
 						int upper_bound, int lower_bound, int init_val) {
 
   param_t * param;
@@ -505,7 +505,7 @@ param_t * new_param_int(char * name, short int flags, void * engine_val,
 }
 
 /* Creates a new parameter of type bool */
-param_t * new_param_bool(char * name, short int flags, void * engine_val,
+param_t * new_param_bool(const char * name, short int flags, void * engine_val,
 						int upper_bound, int lower_bound, int init_val) {
 
   param_t * param;
@@ -525,8 +525,8 @@ param_t * new_param_bool(char * name, short int flags, void * engine_val,
 
 
 /* Loads a integer parameter into the builtin database */
-int load_builtin_param_int(char * name, void * engine_val, short int flags,
-						int init_val, int upper_bound, int lower_bound, char * alt_name) {
+int load_builtin_param_int(const char * name, void * engine_val, short int flags,
+						int init_val, int upper_bound, int lower_bound, const char * alt_name) {
 
   param_t * param;
   value_t iv, ub, lb;
@@ -555,8 +555,8 @@ int load_builtin_param_int(char * name, void * engine_val, short int flags,
 }							
 							
 /* Loads a boolean parameter */
-int load_builtin_param_bool(char * name, void * engine_val, short int flags, 
-								int init_val, char * alt_name) {
+int load_builtin_param_bool(const char * name, void * engine_val, short int flags,
+								int init_val, const char * alt_name) {
 
   param_t * param;
   value_t iv, ub, lb;
diff --git a/modules/visualization/galaktos/param.h b/modules/visualization/galaktos/param.h
index 1fc6713..ecf14ac 100644
--- a/modules/visualization/galaktos/param.h
+++ b/modules/visualization/galaktos/param.h
@@ -8,7 +8,7 @@
 /* Used to store a number of decidable type */
 
 /* Function prototypes */
-param_t * create_param (char * name, short int type, short int flags, void * eqn_val, void * matrix,
+param_t * create_param (const char * name, short int type, short int flags, void * eqn_val, void * matrix,
 							value_t default_init_val, value_t upper_bound, value_t lower_bound);
 param_t * create_user_param(char * name);
 int init_builtin_param_db();
@@ -22,13 +22,13 @@ void free_param(param_t * param);
 int load_all_builtin_param();
 int insert_param(param_t * param, splaytree_t * database);
 param_t * find_builtin_param(char * name);
-param_t * new_param_double(char * name, short int flags, void * engine_val, void * matrix,
+param_t * new_param_double(const char * name, short int flags, void * engine_val, void * matrix,
 		        double upper_bound, double lower_bound, double init_val);
 
-param_t * new_param_int(char * name, short int flags, void * engine_val,
+param_t * new_param_int(const char * name, short int flags, void * engine_val,
 			int upper_bound, int lower_bound, int init_val);
 
-param_t * new_param_bool(char * name, short int flags, void * engine_val,
+param_t * new_param_bool(const char * name, short int flags, void * engine_val,
 			 int upper_bound, int lower_bound, int init_val);
 
 param_t * find_param_db(char * name, splaytree_t * database, int create_flag);
diff --git a/modules/visualization/galaktos/splaytree.c b/modules/visualization/galaktos/splaytree.c
index 0417fda..5049cf4 100644
--- a/modules/visualization/galaktos/splaytree.c
+++ b/modules/visualization/galaktos/splaytree.c
@@ -403,7 +403,7 @@ splaynode_t * new_splaynode(int type, void * key, void * data) {
 }
 
 /* Inserts a link into the splay tree */
-int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree) {
+int splay_insert_link(const void * alias_key, void * orig_key, splaytree_t * splaytree) {
 
    splaynode_t * splaynode, * data_node;
    void * key_clone;
diff --git a/modules/visualization/galaktos/splaytree.h b/modules/visualization/galaktos/splaytree.h
index 4af6ac3..fb82588 100644
--- a/modules/visualization/galaktos/splaytree.h
+++ b/modules/visualization/galaktos/splaytree.h
@@ -10,7 +10,7 @@
 
 void * splay_find(void * key, splaytree_t * t);
 int splay_insert(void * data, void * key, splaytree_t * t);
-int splay_insert_link(void * alias_key, void * orig_key, splaytree_t * splaytree);
+int splay_insert_link(const void * alias_key, void * orig_key, splaytree_t * splaytree);
 int splay_delete(void * key, splaytree_t * splaytree);
 int splay_size(splaytree_t * t);
 splaytree_t * create_splaytree(int (*compare)(), void * (*copy_key)(), void (*free_key)());




More information about the vlc-devel mailing list