瀏覽代碼

Make some string literals "const char *", not "char *" (thanks, Martin!).

Fixes Bugzilla #3007.
Ryan C. Gordon 10 年之前
父節點
當前提交
714687427a
共有 2 個文件被更改,包括 2 次插入2 次删除
  1. 1 1
      src/core/linux/SDL_evdev.c
  2. 1 1
      src/core/linux/SDL_udev.c

+ 1 - 1
src/core/linux/SDL_evdev.c

@@ -341,7 +341,7 @@ static Uint8 EVDEV_MouseButtons[] = {
     SDL_BUTTON_X2 + 3           /*  BTN_TASK        0x117 */
 };
 
-static char* EVDEV_consoles[] = {
+static const char* EVDEV_consoles[] = {
     "/proc/self/fd/0",
     "/dev/tty",
     "/dev/tty0",

+ 1 - 1
src/core/linux/SDL_udev.c

@@ -33,7 +33,7 @@
 
 #include "SDL.h"
 
-static char* SDL_UDEV_LIBS[] = { "libudev.so.1", "libudev.so.0" };
+static const char* SDL_UDEV_LIBS[] = { "libudev.so.1", "libudev.so.0" };
 
 #define _THIS SDL_UDEV_PrivateData *_this
 static _THIS = NULL;