fixes for -Wmissing-declarations and -Wwrite-strings warnings

Mike McCormack mike at codeweavers.com
Thu Jun 2 06:31:36 CDT 2005


ChangeLog:
* fixes for -Wmissing-declarations and -Wwrite-strings warnings
-------------- next part --------------
? programs/wordpad
? programs/uninstaller/uninstaller.rc
? programs/winedbg/gdiobj.c
Index: programs/winecfg/appdefaults.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/appdefaults.c,v
retrieving revision 1.13
diff -u -p -r1.13 appdefaults.c
--- programs/winecfg/appdefaults.c	7 May 2005 18:06:35 -0000	1.13
+++ programs/winecfg/appdefaults.c	2 Jun 2005 11:32:05 -0000
@@ -69,7 +69,7 @@ static void update_comboboxes(HWND dialo
   HeapFree(GetProcessHeap(), 0, winver);
 }
 
-void
+static void
 init_comboboxes (HWND dialog)
 {
   int i;
@@ -97,14 +97,14 @@ init_comboboxes (HWND dialog)
   }
 }
 
-static void add_listview_item(HWND listview, char *text, void *association)
+static void add_listview_item(HWND listview, const char *text, void *association)
 {
   LVITEM item;
 
   ZeroMemory(&item, sizeof(LVITEM));
 
   item.mask = LVIF_TEXT | LVIF_PARAM;
-  item.pszText = text;
+  item.pszText = (char*) text;
   item.cchTextMax = strlen(text);
   item.lParam = (LPARAM) association;
   item.iItem = ListView_GetItemCount(listview);
Index: programs/winecfg/audio.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/audio.c,v
retrieving revision 1.5
diff -u -p -r1.5 audio.c
--- programs/winecfg/audio.c	16 Feb 2005 17:51:37 -0000	1.5
+++ programs/winecfg/audio.c	2 Jun 2005 11:32:05 -0000
@@ -44,7 +44,7 @@
 WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
 
 /* Select the correct entry in the combobox based on drivername */
-void selectAudioDriver(HWND hDlg, char *drivername)
+static void selectAudioDriver(HWND hDlg, const char *drivername)
 {
   int i;
   const AUDIO_DRIVER *pAudioDrv = NULL;
@@ -64,7 +64,7 @@ void selectAudioDriver(HWND hDlg, char *
   }
 }
 
-void initAudioDlg (HWND hDlg)
+static void initAudioDlg (HWND hDlg)
 {
     char *curAudioDriver = get("Winmm", "Drivers", "winealsa.drv");
     const AUDIO_DRIVER *pAudioDrv = NULL;
@@ -82,14 +82,14 @@ void initAudioDlg (HWND hDlg)
     }
 }
 
-char *audioAutoDetect(void)
+static const char *audioAutoDetect(void)
 {
   struct stat buf;
   const char *argv_new[4];
   int fd;
 
-  char *driversFound[10];
-  char *name[10];
+  const char *driversFound[10];
+  const char *name[10];
   int numFound = 0;
 
   argv_new[0] = "/bin/sh";
Index: programs/winecfg/drive.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/drive.c,v
retrieving revision 1.27
diff -u -p -r1.27 drive.c
--- programs/winecfg/drive.c	18 May 2005 15:33:20 -0000	1.27
+++ programs/winecfg/drive.c	2 Jun 2005 11:32:06 -0000
@@ -83,7 +83,7 @@ long drive_available_mask(char letter)
   return result;
 }
 
-BOOL add_drive(char letter, char *targetpath, char *label, char *serial, unsigned int type)
+BOOL add_drive(const char letter, const char *targetpath, const char *label, const char *serial, unsigned int type)
 {
     int driveIndex = letter_to_index(letter);
 
@@ -396,7 +396,7 @@ void apply_drive_changes()
             HANDLE hFile;
 
             HKEY hKey;
-            char *typeText;
+            const char *typeText;
             char driveValue[256];
 
             /* define this drive */
Index: programs/winecfg/drivedetect.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/drivedetect.c,v
retrieving revision 1.6
diff -u -p -r1.6 drivedetect.c
--- programs/winecfg/drivedetect.c	18 Apr 2005 10:30:55 -0000	1.6
+++ programs/winecfg/drivedetect.c	2 Jun 2005 11:32:06 -0000
@@ -50,7 +50,7 @@ static DEV_NODES sDeviceNodes[] = {
   {"",0}
 };
 
-static char *ignored_fstypes[] = {
+static const char *ignored_fstypes[] = {
     "devpts",
     "tmpfs",
     "proc",
@@ -61,7 +61,7 @@ static char *ignored_fstypes[] = {
     NULL
 };
 
-static char *ignored_mnt_dirs[] = {
+static const char *ignored_mnt_dirs[] = {
     "/boot",
     NULL
 };
@@ -82,7 +82,7 @@ static int try_dev_node(char *dev)
 
 static BOOL should_ignore_fstype(char *type)
 {
-    char **s;
+    const char **s;
     
     for (s = ignored_fstypes; *s; s++)
         if (!strcmp(*s, type)) return TRUE;
@@ -92,7 +92,7 @@ static BOOL should_ignore_fstype(char *t
 
 static BOOL should_ignore_mnt_dir(char *dir)
 {
-    char **s;
+    const char **s;
 
     for (s = ignored_mnt_dirs; *s; s++)
         if (!strcmp(*s, dir)) return TRUE;
Index: programs/winecfg/driveui.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/driveui.c,v
retrieving revision 1.14
diff -u -p -r1.14 driveui.c
--- programs/winecfg/driveui.c	19 May 2005 11:14:52 -0000	1.14
+++ programs/winecfg/driveui.c	2 Jun 2005 11:32:06 -0000
@@ -143,14 +143,15 @@ static const struct drive_typemap type_p
 
 #define DRIVE_TYPE_DEFAULT 1
 
-void fill_drive_droplist(long mask, char curletter, HWND dialog)
+static void fill_drive_droplist(long mask, char curletter, HWND dialog)
 {
     int i;
     int selection;
     int count;
     int next_letter;
-    char sName[4] = "A:";
+    char sName[4];
 
+    strcpy(sName, "A:");
     for (i = 0, count = 0, selection = -1, next_letter = -1; i <= 'Z'-'A'; ++i)
     {
         if (mask & DRIVE_MASK_BIT('A' + i))
@@ -184,7 +185,7 @@ void fill_drive_droplist(long mask, char
 }
 
 
-void enable_labelserial_box(HWND dialog, int mode)
+static void enable_labelserial_box(HWND dialog, int mode)
 {
     WINE_TRACE("mode=%d\n", mode);
 
@@ -232,7 +233,7 @@ void enable_labelserial_box(HWND dialog,
     }
 }
 
-int fill_drives_list(HWND dialog)
+static int fill_drives_list(HWND dialog)
 {
     int count = 0;
     BOOL drivec_present = FALSE;
@@ -306,7 +307,7 @@ int fill_drives_list(HWND dialog)
     return count;
 }
 
-void on_options_click(HWND dialog)
+static void on_options_click(HWND dialog)
 {
     if (IsDlgButtonChecked(dialog, IDC_SHOW_DIRSYM_LINK) == BST_CHECKED)
         set("wine", "ShowDirSymLinks", "Y");
@@ -319,7 +320,7 @@ void on_options_click(HWND dialog)
         set("wine", "ShowDotFiles", "N");
 }
 
-void on_add_click(HWND dialog)
+static void on_add_click(HWND dialog)
 {
     /* we should allocate a drive letter automatically. We also need
        some way to let the user choose the mapping point, for now we
@@ -363,7 +364,7 @@ void on_add_click(HWND dialog)
     update_controls(dialog);
 }
 
-void on_remove_click(HWND dialog)
+static void on_remove_click(HWND dialog)
 {
     int itemIndex;
     struct drive *drive;
@@ -408,7 +409,7 @@ static void update_controls(HWND dialog)
     unsigned int type;
     char *label;
     char *serial;
-    char *device;
+    const char *device;
     int i, selection = -1;
     LVITEM item;
 
@@ -501,7 +502,7 @@ static void update_controls(HWND dialog)
     return;
 }
 
-void on_edit_changed(HWND dialog, WORD id)
+static void on_edit_changed(HWND dialog, WORD id)
 {
     if (updating_ui) return;
 
@@ -668,14 +669,14 @@ static void init_listview_columns(HWND d
     width = (viewRect.right - viewRect.left) / 6 - 5;
 
     listColumn.mask = LVCF_TEXT | LVCF_WIDTH | LVCF_SUBITEM;
-    listColumn.pszText = "Letter";
+    listColumn.pszText = (char*) "Letter";
     listColumn.cchTextMax = lstrlen(listColumn.pszText);
     listColumn.cx = width;
 
     SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 0, (LPARAM) &listColumn);
 
     listColumn.cx = viewRect.right - viewRect.left - width;
-    listColumn.pszText = "Drive Mapping";
+    listColumn.pszText = (char*) "Drive Mapping";
     listColumn.cchTextMax = lstrlen(listColumn.pszText);
 
     SendDlgItemMessage(dialog, IDC_LIST_DRIVES, LVM_INSERTCOLUMN, 1, (LPARAM) &listColumn);
Index: programs/winecfg/libraries.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/libraries.c,v
retrieving revision 1.6
diff -u -p -r1.6 libraries.c
--- programs/winecfg/libraries.c	17 Jan 2005 13:41:58 -0000	1.6
+++ programs/winecfg/libraries.c	2 Jun 2005 11:32:06 -0000
@@ -77,7 +77,7 @@ static enum dllmode string_to_mode(char 
 }
 
 /* Convert a dllmode to a registry string. */
-static char* mode_to_string(enum dllmode mode)
+static const char* mode_to_string(enum dllmode mode)
 {
     switch( mode )
     {
@@ -91,7 +91,7 @@ static char* mode_to_string(enum dllmode
 }
 
 /* Convert a dllmode to a pretty string for display. TODO: use translations. */
-static char* mode_to_label(enum dllmode mode)
+static const char* mode_to_label(enum dllmode mode)
 {
     WINE_FIXME("translate me");
     return mode_to_string(mode);
@@ -197,7 +197,8 @@ static void load_library_settings(HWND d
     for (p = overrides; *p != NULL; p++)
     {
         int index;
-        char *str, *value, *label;
+        char *str, *value;
+        const char *label;
         struct dll *dll;
 
         value = get(keypath("DllOverrides"), *p, NULL);
@@ -259,7 +260,7 @@ static void set_dllmode(HWND dialog, DWO
     enum dllmode mode;
     struct dll *dll;
     int sel;
-    char *str;
+    const char *str;
 
     mode = id_to_mode(id);
 
Index: programs/winecfg/main.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/main.c,v
retrieving revision 1.22
diff -u -p -r1.22 main.c
--- programs/winecfg/main.c	9 Mar 2005 16:41:30 -0000	1.22
+++ programs/winecfg/main.c	2 Jun 2005 11:32:06 -0000
@@ -46,7 +46,7 @@
 
 WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
 
-void CALLBACK
+static void CALLBACK
 PropSheetCallback (HWND hWnd, UINT uMsg, LPARAM lParam)
 {
     switch (uMsg)
@@ -65,7 +65,7 @@ PropSheetCallback (HWND hWnd, UINT uMsg,
     }
 }
 
-INT_PTR CALLBACK
+static INT_PTR CALLBACK
 AboutDlgProc (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 {
     switch (uMsg) {
@@ -88,7 +88,7 @@ AboutDlgProc (HWND hDlg, UINT uMsg, WPAR
 
 #define NUM_PROPERTY_PAGES 6
 
-INT_PTR
+static INT_PTR
 doPropertySheet (HINSTANCE hInstance, HWND hOwner)
 {
     PROPSHEETPAGE psp[NUM_PROPERTY_PAGES];
@@ -202,7 +202,7 @@ doPropertySheet (HINSTANCE hInstance, HW
  *              no option at all. Has to be reworked, if more options are to
  *              be supported.
  */
-BOOL
+static BOOL
 ProcessCmdLine(LPSTR lpCmdLine)
 {
     if ((lpCmdLine[0] == '/' || lpCmdLine[0] == '-') && 
Index: programs/winecfg/winecfg.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/winecfg.c,v
retrieving revision 1.31
diff -u -p -r1.31 winecfg.c
--- programs/winecfg/winecfg.c	18 Apr 2005 09:54:03 -0000	1.31
+++ programs/winecfg/winecfg.c	2 Jun 2005 11:32:06 -0000
@@ -55,7 +55,7 @@ void set_window_title(HWND dialog)
     /* update the window title  */
     if (current_app)
     {
-        char *template = "Wine Configuration for %s";
+        const char *template = "Wine Configuration for %s";
         newtitle = HeapAlloc(GetProcessHeap(), 0, strlen(template) + strlen(current_app) + 1);
         sprintf(newtitle, template, current_app);
     }
@@ -81,7 +81,7 @@ void set_window_title(HWND dialog)
  * not. Caller is responsible for releasing the result.
  *
  */
-static char *get_config_key (char *subkey, char *name, char *def)
+static char *get_config_key (const char *subkey, const char *name, const char *def)
 {
     LPBYTE buffer = NULL;
     DWORD len;
@@ -139,7 +139,7 @@ end:
  *
  * If valueName or value is NULL, an empty section will be created
  */
-int set_config_key(const char *subkey, const char *name, const char *value) {
+static int set_config_key(const char *subkey, const char *name, const char *value) {
     DWORD res = 1;
     HKEY key = NULL;
 
@@ -236,7 +236,7 @@ static void free_setting(struct setting 
  * If already in the list, the contents as given there will be
  * returned. You are expected to HeapFree the result.
  */
-char *get(char *path, char *name, char *def)
+char *get(const char *path, const char *name, const char *def)
 {
     struct list *cursor;
     struct setting *s;
@@ -277,7 +277,7 @@ char *get(char *path, char *name, char *
  *
  * These values will be copied when necessary.
  */
-void set(char *path, char *name, char *value)
+void set(const char *path, const char *name, const char *value)
 {
     struct list *cursor;
     struct setting *s;
@@ -440,7 +440,7 @@ char **enumerate_values(char *path)
  * returns true if the given key/value pair exists in the registry or
  * has been written to.
  */
-BOOL exists(char *path, char *name)
+BOOL exists(const char *path, const char *name)
 {
     char *val = get(path, name, NULL);
 
@@ -487,7 +487,7 @@ void apply(void)
 char *current_app = NULL; /* the app we are currently editing, or NULL if editing global */
 
 /* returns a registry key path suitable for passing to addTransaction  */
-char *keypath(char *section)
+char *keypath(const char *section)
 {
     static char *result = NULL;
 
Index: programs/winecfg/winecfg.h
===================================================================
RCS file: /home/wine/wine/programs/winecfg/winecfg.h,v
retrieving revision 1.21
diff -u -p -r1.21 winecfg.h
--- programs/winecfg/winecfg.h	14 Feb 2005 11:01:16 -0000	1.21
+++ programs/winecfg/winecfg.h	2 Jun 2005 11:32:06 -0000
@@ -48,9 +48,9 @@ extern char *current_app; /* NULL means 
    be copied, so release them too when necessary.
  */
 
-void set(char *path, char *name, char *value);
-char *get(char *path, char *name, char *def);
-BOOL exists(char *path, char *name);
+void set(const char *path, const char *name, const char *value);
+char *get(const char *path, const char *name, const char *def);
+BOOL exists(const char *path, const char *name);
 void apply(void);
 char **enumerate_values(char *path);
 
@@ -59,7 +59,7 @@ char **enumerate_values(char *path);
  
    no explicit free is needed of the string returned by this function
  */
-char *keypath(char *section); 
+char *keypath(const char *section); 
 
 int initialize(void);
 extern HKEY config_key;
@@ -93,7 +93,7 @@ struct drive
 #define DRIVE_MASK_BIT(B) 1 << (toupper(B) - 'A')
 
 long drive_available_mask(char letter);
-BOOL add_drive(char letter, char *targetpath, char *label, char *serial, unsigned int type);
+BOOL add_drive(const char letter, const char *targetpath, const char *label, const char *serial, unsigned int type);
 void delete_drive(struct drive *pDrive);
 void apply_drive_changes();
 extern struct drive drives[26]; /* one for each drive letter */
@@ -106,7 +106,7 @@ BOOL gui_mode;
 void PRINTERROR(void); /* WINE_TRACE() the plaintext error message from GetLastError() */
 
 /* returns a string in the win32 heap  */
-static inline char *strdupA(char *s)
+static inline char *strdupA(const char *s)
 {
     char *r = HeapAlloc(GetProcessHeap(), 0, strlen(s)+1);
     return strcpy(r, s);
@@ -121,7 +121,7 @@ static inline char *get_text(HWND dialog
     return result;
 }
 
-static inline void set_text(HWND dialog, WORD id, char *text)
+static inline void set_text(HWND dialog, WORD id, const char *text)
 {
     SetWindowText(GetDlgItem(dialog, id), text);
 }
Index: programs/winecfg/x11drvdlg.c
===================================================================
RCS file: /home/wine/wine/programs/winecfg/x11drvdlg.c,v
retrieving revision 1.19
diff -u -p -r1.19 x11drvdlg.c
--- programs/winecfg/x11drvdlg.c	15 Feb 2005 21:51:06 -0000	1.19
+++ programs/winecfg/x11drvdlg.c	2 Jun 2005 11:32:06 -0000
@@ -38,7 +38,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(winecfg);
 
 int updating_ui;
 
-void update_gui_for_desktop_mode(HWND dialog) {
+static void update_gui_for_desktop_mode(HWND dialog) {
     WINE_TRACE("\n");
 
     updating_ui = TRUE;
@@ -161,7 +161,7 @@ static void set_from_desktop_edits(HWND 
     HeapFree(GetProcessHeap(), 0, new);
 }
 
-void on_enable_desktop_clicked(HWND dialog) {
+static void on_enable_desktop_clicked(HWND dialog) {
     WINE_TRACE("\n");
     
     if (IsDlgButtonChecked(dialog, IDC_ENABLE_DESKTOP) == BST_CHECKED) {
Index: programs/winemenubuilder/winemenubuilder.c
===================================================================
RCS file: /home/wine/wine/programs/winemenubuilder/winemenubuilder.c,v
retrieving revision 1.28
diff -u -p -r1.28 winemenubuilder.c
--- programs/winemenubuilder/winemenubuilder.c	7 May 2005 14:50:40 -0000	1.28
+++ programs/winemenubuilder/winemenubuilder.c	2 Jun 2005 11:32:06 -0000
@@ -611,9 +611,9 @@ static LPSTR escape(LPCWSTR arg)
     return narg;
 }
 
-static int fork_and_wait( char *linker, char *link_name, char *path,
-                          int desktop, char *args, char *icon_name,
-                          char *workdir, char *description )
+static int fork_and_wait( const char *linker, const char *link_name, const char *path,
+                          int desktop, const char *args, const char *icon_name,
+                          const char *workdir, const char *description )
 {
     int pos = 0;
     const char *argv[20];
Index: programs/winemine/main.c
===================================================================
RCS file: /home/wine/wine/programs/winemine/main.c,v
retrieving revision 1.18
diff -u -p -r1.18 main.c
--- programs/winemine/main.c	18 May 2005 15:33:20 -0000	1.18
+++ programs/winemine/main.c	2 Jun 2005 11:32:06 -0000
@@ -447,7 +447,7 @@ void SetDifficulty( BOARD *p_board, DIFF
     }
 }
 
-void ShiftBetween(LONG* x, LONG* y, LONG a, LONG b)
+static void ShiftBetween(LONG* x, LONG* y, LONG a, LONG b)
 {
     if (*x < a) {
 	*y += a - *x;
@@ -458,7 +458,8 @@ void ShiftBetween(LONG* x, LONG* y, LONG
 	*y = b;
     }
 }
-void MoveOnScreen(RECT* rect)
+
+static void MoveOnScreen(RECT* rect)
 {
     HMONITOR hMonitor;
     MONITORINFO mi;
Index: programs/winetest/gui.c
===================================================================
RCS file: /home/wine/wine/programs/winetest/gui.c,v
retrieving revision 1.10
diff -u -p -r1.10 gui.c
--- programs/winetest/gui.c	18 Apr 2005 09:54:24 -0000	1.10
+++ programs/winetest/gui.c	2 Jun 2005 11:32:06 -0000
@@ -26,34 +26,24 @@
 
 /* Event object to signal successful window creation to main thread.
  */
-HANDLE initEvent;
+static HANDLE initEvent;
 
 /* Dialog handle
  */
-HWND dialog;
+static HWND dialog;
 
 /* Progress data for the text* functions and for scaling.
  */
-unsigned int progressMax, progressCurr;
-double progressScale;
+static unsigned int progressMax, progressCurr;
+static double progressScale;
 
 /* Progress group counter for the gui* functions.
  */
-int progressGroup;
+static int progressGroup;
 
-WNDPROC DefEditProc;
+static WNDPROC DefEditProc;
 
-char *
-renderString (va_list ap)
-{
-    const char *fmt = va_arg (ap, char*);
-    static char buffer[128];
-
-    vsnprintf (buffer, sizeof buffer, fmt, ap);
-    return buffer;
-}
-
-int
+static int
 MBdefault (int uType)
 {
     static const int matrix[][4] = {{IDOK,    0,        0,        0},
@@ -69,7 +59,7 @@ MBdefault (int uType)
 }
 
 /* report (R_STATUS, fmt, ...) */
-int
+static int
 textStatus (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -80,7 +70,7 @@ textStatus (va_list ap)
     return 0;
 }
 
-int
+static int
 guiStatus (va_list ap)
 {
     size_t len;
@@ -93,7 +83,7 @@ guiStatus (va_list ap)
 }
 
 /* report (R_PROGRESS, barnum, steps) */
-int
+static int
 textProgress (va_list ap)
 {
     progressGroup = va_arg (ap, int);
@@ -102,7 +92,7 @@ textProgress (va_list ap)
     return 0;
 }
 
-int
+static int
 guiProgress (va_list ap)
 {
     unsigned int max;
@@ -123,7 +113,7 @@ guiProgress (va_list ap)
 }
 
 /* report (R_STEP, fmt, ...) */
-int
+static int
 textStep (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -135,7 +125,7 @@ textStep (va_list ap)
     return 0;
 }
 
-int
+static int
 guiStep (va_list ap)
 {
     const int pgID = IDC_ST0 + progressGroup * 2;
@@ -150,7 +140,7 @@ guiStep (va_list ap)
 }
 
 /* report (R_DELTA, inc, fmt, ...) */
-int
+static int
 textDelta (va_list ap)
 {
     const int inc = va_arg (ap, int);
@@ -163,7 +153,7 @@ textDelta (va_list ap)
     return 0;
 }
 
-int
+static int
 guiDelta (va_list ap)
 {
     const int inc = va_arg (ap, int);
@@ -179,7 +169,7 @@ guiDelta (va_list ap)
 }
 
 /* report (R_TAG) */
-int
+static int
 textTag (va_list ap)
 {
     fputs ("Tag: ", stderr);
@@ -188,7 +178,7 @@ textTag (va_list ap)
     return 0;
 }
 
-int
+static int
 guiTag (va_list ap)
 {
     SetDlgItemText (dialog, IDC_TAG, tag);
@@ -196,7 +186,7 @@ guiTag (va_list ap)
 }
 
 /* report (R_DIR, fmt, ...) */
-int
+static int
 textDir (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -208,7 +198,7 @@ textDir (va_list ap)
     return 0;
 }
 
-int
+static int
 guiDir (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -219,7 +209,7 @@ guiDir (va_list ap)
 }
 
 /* report (R_OUT, fmt, ...) */
-int
+static int
 textOut (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -231,7 +221,7 @@ textOut (va_list ap)
     return 0;
 }
 
-int
+static int
 guiOut (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -242,7 +232,7 @@ guiOut (va_list ap)
 }
 
 /* report (R_WARNING, fmt, ...) */
-int
+static int
 textWarning (va_list ap)
 {
     fputs ("Warning: ", stderr);
@@ -250,7 +240,7 @@ textWarning (va_list ap)
     return 0;
 }
 
-int
+static int
 guiWarning (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -261,7 +251,7 @@ guiWarning (va_list ap)
 }
 
 /* report (R_ERROR, fmt, ...) */
-int
+static int
 textError (va_list ap)
 {
     fputs ("Error: ", stderr);
@@ -269,7 +259,7 @@ textError (va_list ap)
     return 0;
 }
 
-int
+static int
 guiError (va_list ap)
 {
     char *str = vstrmake (NULL, ap);
@@ -280,14 +270,14 @@ guiError (va_list ap)
 }
 
 /* report (R_FATAL, fmt, ...) */
-int
+static int
 textFatal (va_list ap)
 {
     textError (ap);
     exit (1);
 }
 
-int
+static int
 guiFatal (va_list ap)
 {
     guiError (ap);
@@ -295,7 +285,7 @@ guiFatal (va_list ap)
 }
 
 /* report (R_ASK, type, fmt, ...) */
-int
+static int
 textAsk (va_list ap)
 {
     int uType = va_arg (ap, int);
@@ -308,7 +298,7 @@ textAsk (va_list ap)
     return ret;
 }
 
-int
+static int
 guiAsk (va_list ap)
 {
     int uType = va_arg (ap, int);
@@ -320,7 +310,7 @@ guiAsk (va_list ap)
     return ret;
 }
 
-BOOL CALLBACK
+static BOOL CALLBACK
 EditTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch (msg) {
@@ -333,7 +323,7 @@ EditTagProc (HWND hwnd, UINT msg, WPARAM
     return CallWindowProcA (DefEditProc, hwnd, msg, wParam, lParam);
 }
 
-BOOL CALLBACK
+static BOOL CALLBACK
 AskTagProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     int len;
@@ -368,25 +358,25 @@ guiAskTag (void)
 }
 
 /* Quiet functions */
-int
+static int
 qNoOp (va_list ap)
 {
     return 0;
 }
 
-int
+static int
 qFatal (va_list ap)
 {
     exit (1);
 }
 
-int
+static int
 qAsk (va_list ap)
 {
     return MBdefault (va_arg (ap, int));
 }
 
-BOOL CALLBACK
+static BOOL CALLBACK
 AboutProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch (msg) {
@@ -400,7 +390,7 @@ AboutProc (HWND hwnd, UINT msg, WPARAM w
     return FALSE;
 }
 
-BOOL CALLBACK
+static BOOL CALLBACK
 DlgProc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
 {
     switch (msg) {
@@ -435,8 +425,8 @@ DlgProc (HWND hwnd, UINT msg, WPARAM wPa
     return FALSE;
 }
 
-DWORD WINAPI
-DlgThreadProc ()
+static DWORD WINAPI
+DlgThreadProc (LPVOID param)
 {
     int ret;
 
Index: programs/winhelp/macro.c
===================================================================
RCS file: /home/wine/wine/programs/winhelp/macro.c,v
retrieving revision 1.21
diff -u -p -r1.21 macro.c
--- programs/winhelp/macro.c	13 Dec 2004 21:06:46 -0000	1.21
+++ programs/winhelp/macro.c	2 Jun 2005 11:32:06 -0000
@@ -33,10 +33,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(winhelp);
 /*               Macro table                      */
 /**************************************************/
 struct MacroDesc {
-    char*       name;
-    char*       alias;
+    const char* name;
+    const char* alias;
     BOOL        isBool;
-    char*       arguments;
+    const char* arguments;
     FARPROC     fn;
 };
 


More information about the wine-patches mailing list