[janitor] tools/winegcc -Wwrite-strings cleanup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fixed warnings with gcc option "-Wwrite-strings".

Index: tools/winegcc/utils.c
===================================================================
RCS file: /home/wine/wine/tools/winegcc/utils.c,v
retrieving revision 1.1
diff -u -r1.1 utils.c
--- tools/winegcc/utils.c	11 Sep 2003 22:16:33 -0000	1.1
+++ tools/winegcc/utils.c	12 Oct 2003 07:40:14 -0000
@@ -99,7 +99,7 @@
     free(arr);
 }
 
-void strarray_add(strarray* arr, char* str)
+void strarray_add(strarray* arr, const char* str)
 {
     if (arr->size == arr->maximum)
     {
@@ -109,10 +109,10 @@
     arr->base[arr->size++] = str;
 }
 
-void spawn(strarray* arr)
+void spawn(const strarray* arr)
 {
     int i, status;
-    char **argv = arr->base;
+    char * const *argv = (char * const *)(unsigned long)arr->base;
 
     if (verbose)
     {
Index: tools/winegcc/utils.h
===================================================================
RCS file: /home/wine/wine/tools/winegcc/utils.h,v
retrieving revision 1.1
diff -u -r1.1 utils.h
--- tools/winegcc/utils.h	11 Sep 2003 22:16:33 -0000	1.1
+++ tools/winegcc/utils.h	12 Oct 2003 07:40:14 -0000
@@ -30,13 +30,13 @@
 typedef struct {
     size_t maximum;
     size_t size;
-    char** base;
+    const char** base;
 } strarray;
 
 strarray *strarray_alloc(void);
 void strarray_free(strarray* arr);
-void strarray_add(strarray* arr, char* str);
+void strarray_add(strarray* arr, const char* str);
 
-void spawn(strarray* arr);
+void spawn(const strarray* arr);
 
 extern int verbose;
Index: tools/winegcc/winewrap.c
===================================================================
RCS file: /home/wine/wine/tools/winegcc/winewrap.c,v
retrieving revision 1.7
diff -u -r1.7 winewrap.c
--- tools/winegcc/winewrap.c	10 Oct 2003 23:33:45 -0000	1.7
+++ tools/winegcc/winewrap.c	12 Oct 2003 07:40:17 -0000
@@ -215,7 +215,7 @@
     "}\n"
 ;
 
-static char *output_name = "a.out";
+static const char *output_name = "a.out";
 static strarray *arh_files, *dll_files, *lib_files, *llib_paths, *lib_paths, *obj_files;
 static int keep_generated = 0;
 
@@ -345,7 +345,8 @@
 static void create_the_wrapper(char* base_file, char* base_name, char* app_name, int gui_mode)
 {
     char *wrp_temp_name, *wspec_name, *wspec_c_name, *wspec_o_name;
-    char *wrap_c_name, *wrap_o_name, *dlls = "";
+    char *wrap_c_name, *wrap_o_name;
+    const char *dlls = "";
     strarray *wwrap_args, *wspec_args, *wcomp_args, *wlink_args;
     int i;
 

[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux