|
| 1 | +https://github.com/libsdl-org/SDL-1.2/pull/869 |
| 2 | +https://github.com/libsdl-org/SDL-1.2/commit/ff3516b9ddbb4f8a87d9c3546c0a4fb6eb491cfe |
| 3 | +https://github.com/libsdl-org/SDL-1.2/commit/e738cfffced8a006094d55337d917386582ada47 |
| 4 | + |
| 5 | +From ff3516b9ddbb4f8a87d9c3546c0a4fb6eb491cfe Mon Sep 17 00:00:00 2001 |
| 6 | + |
| 7 | +Date: Sat, 15 Oct 2022 14:35:38 -0700 |
| 8 | +Subject: [PATCH 1/2] Xxf86vm: Fix function definitions without a prototype |
| 9 | + |
| 10 | +This is not supported with the upcoming clang 16. |
| 11 | + |
| 12 | +error: a function definition without a prototype is deprecated in all versions of C and is not supported in C2x [-Werror,-Wdeprecated-non-prototype] |
| 13 | + |
| 14 | +reference: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 |
| 15 | +--- |
| 16 | + src/video/Xext/Xxf86vm/XF86VMode.c | 128 +++++++++++++++-------------- |
| 17 | + 1 file changed, 65 insertions(+), 63 deletions(-) |
| 18 | + |
| 19 | +diff --git a/src/video/Xext/Xxf86vm/XF86VMode.c b/src/video/Xext/Xxf86vm/XF86VMode.c |
| 20 | +index 5cb21905a..c3bd26716 100644 |
| 21 | +--- a/src/video/Xext/Xxf86vm/XF86VMode.c |
| 22 | ++++ b/src/video/Xext/Xxf86vm/XF86VMode.c |
| 23 | +@@ -102,9 +102,11 @@ static XEXT_GENERATE_CLOSE_DISPLAY (close_display, xf86vidmode_info) |
| 24 | + *****************************************************************************/ |
| 25 | + |
| 26 | + Bool |
| 27 | +-SDL_NAME(XF86VidModeQueryExtension) (dpy, event_basep, error_basep) |
| 28 | +- Display *dpy; |
| 29 | +- int *event_basep, *error_basep; |
| 30 | ++SDL_NAME(XF86VidModeQueryExtension)( |
| 31 | ++ Display *dpy, |
| 32 | ++ int *event_basep, |
| 33 | ++ int *error_basep |
| 34 | ++) |
| 35 | + { |
| 36 | + XExtDisplayInfo *info = find_display (dpy); |
| 37 | + |
| 38 | +@@ -118,10 +120,11 @@ SDL_NAME(XF86VidModeQueryExtension) (dpy, event_basep, error_basep) |
| 39 | + } |
| 40 | + |
| 41 | + Bool |
| 42 | +-SDL_NAME(XF86VidModeQueryVersion)(dpy, majorVersion, minorVersion) |
| 43 | +- Display* dpy; |
| 44 | +- int* majorVersion; |
| 45 | +- int* minorVersion; |
| 46 | ++SDL_NAME(XF86VidModeQueryVersion)( |
| 47 | ++ Display *dpy, |
| 48 | ++ int *majorVersion, |
| 49 | ++ int *minorVersion |
| 50 | ++) |
| 51 | + { |
| 52 | + XExtDisplayInfo *info = find_display (dpy); |
| 53 | + xXF86VidModeQueryVersionReply rep; |
| 54 | +@@ -215,11 +218,12 @@ SDL_NAME(XF86VidModeGetGamma)(Display *dpy, int screen, SDL_NAME(XF86VidModeGamm |
| 55 | + } |
| 56 | + |
| 57 | + Bool |
| 58 | +-SDL_NAME(XF86VidModeGetModeLine)(dpy, screen, dotclock, modeline) |
| 59 | +- Display* dpy; |
| 60 | +- int screen; |
| 61 | +- int* dotclock; |
| 62 | +- SDL_NAME(XF86VidModeModeLine)* modeline; |
| 63 | ++SDL_NAME(XF86VidModeGetModeLine)( |
| 64 | ++ Display *dpy, |
| 65 | ++ int screen, |
| 66 | ++ int *dotclock, |
| 67 | ++ SDL_NAME(XF86VidModeModeLine) *modeline |
| 68 | ++) |
| 69 | + { |
| 70 | + XExtDisplayInfo *info = find_display (dpy); |
| 71 | + xXF86VidModeGetModeLineReply rep; |
| 72 | +@@ -292,11 +296,12 @@ SDL_NAME(XF86VidModeGetModeLine)(dpy, screen, dotclock, modeline) |
| 73 | + } |
| 74 | + |
| 75 | + Bool |
| 76 | +-SDL_NAME(XF86VidModeGetAllModeLines)(dpy, screen, modecount, modelinesPtr) |
| 77 | +- Display* dpy; |
| 78 | +- int screen; |
| 79 | +- int* modecount; |
| 80 | +- SDL_NAME(XF86VidModeModeInfo) ***modelinesPtr; |
| 81 | ++SDL_NAME(XF86VidModeGetAllModeLines)( |
| 82 | ++ Display *dpy, |
| 83 | ++ int screen, |
| 84 | ++ int *modecount, |
| 85 | ++ SDL_NAME(XF86VidModeModeInfo) ***modelinesPtr |
| 86 | ++) |
| 87 | + { |
| 88 | + XExtDisplayInfo *info = find_display (dpy); |
| 89 | + xXF86VidModeGetAllModeLinesReply rep; |
| 90 | +@@ -456,11 +461,12 @@ SDL_NAME(XF86VidModeGetAllModeLines)(dpy, screen, modecount, modelinesPtr) |
| 91 | + #endif |
| 92 | + |
| 93 | + Bool |
| 94 | +-SDL_NAME(XF86VidModeAddModeLine) (dpy, screen, newmodeline, aftermodeline) |
| 95 | +- Display *dpy; |
| 96 | +- int screen; |
| 97 | +- SDL_NAME(XF86VidModeModeInfo)* newmodeline; |
| 98 | +- SDL_NAME(XF86VidModeModeInfo)* aftermodeline; |
| 99 | ++SDL_NAME(XF86VidModeAddModeLine)( |
| 100 | ++ Display *dpy, |
| 101 | ++ int screen, |
| 102 | ++ SDL_NAME(XF86VidModeModeInfo) *newmodeline, |
| 103 | ++ SDL_NAME(XF86VidModeModeInfo) *aftermodeline |
| 104 | ++) |
| 105 | + { |
| 106 | + XExtDisplayInfo *info = find_display (dpy); |
| 107 | + xXF86VidModeAddModeLineReq *req; |
| 108 | +@@ -569,10 +575,11 @@ SDL_NAME(XF86VidModeAddModeLine) (dpy, screen, newmodeline, aftermodeline) |
| 109 | + } |
| 110 | + |
| 111 | + Bool |
| 112 | +-SDL_NAME(XF86VidModeDeleteModeLine) (dpy, screen, modeline) |
| 113 | +- Display *dpy; |
| 114 | +- int screen; |
| 115 | +- SDL_NAME(XF86VidModeModeInfo)* modeline; |
| 116 | ++SDL_NAME(XF86VidModeDeleteModeLine)( |
| 117 | ++ Display *dpy, |
| 118 | ++ int screen, |
| 119 | ++ SDL_NAME(XF86VidModeModeInfo) *modeline |
| 120 | ++) |
| 121 | + { |
| 122 | + XExtDisplayInfo *info = find_display (dpy); |
| 123 | + xXF86VidModeDeleteModeLineReq *req; |
| 124 | +@@ -633,10 +640,11 @@ SDL_NAME(XF86VidModeDeleteModeLine) (dpy, screen, modeline) |
| 125 | + } |
| 126 | + |
| 127 | + Bool |
| 128 | +-SDL_NAME(XF86VidModeModModeLine) (dpy, screen, modeline) |
| 129 | +- Display *dpy; |
| 130 | +- int screen; |
| 131 | +- SDL_NAME(XF86VidModeModeLine)* modeline; |
| 132 | ++SDL_NAME(XF86VidModeModModeLine)( |
| 133 | ++ Display *dpy, |
| 134 | ++ int screen, |
| 135 | ++ SDL_NAME(XF86VidModeModeLine) *modeline |
| 136 | ++) |
| 137 | + { |
| 138 | + XExtDisplayInfo *info = find_display (dpy); |
| 139 | + xXF86VidModeModModeLineReq *req; |
| 140 | +@@ -695,10 +703,11 @@ SDL_NAME(XF86VidModeModModeLine) (dpy, screen, modeline) |
| 141 | + } |
| 142 | + |
| 143 | + Status |
| 144 | +-SDL_NAME(XF86VidModeValidateModeLine) (dpy, screen, modeline) |
| 145 | +- Display *dpy; |
| 146 | +- int screen; |
| 147 | +- SDL_NAME(XF86VidModeModeInfo)* modeline; |
| 148 | ++SDL_NAME(XF86VidModeValidateModeLine)( |
| 149 | ++ Display *dpy, |
| 150 | ++ int screen, |
| 151 | ++ SDL_NAME(XF86VidModeModeInfo) *modeline |
| 152 | ++) |
| 153 | + { |
| 154 | + XExtDisplayInfo *info = find_display (dpy); |
| 155 | + xXF86VidModeValidateModeLineReq *req; |
| 156 | +@@ -766,10 +775,7 @@ SDL_NAME(XF86VidModeValidateModeLine) (dpy, screen, modeline) |
| 157 | + } |
| 158 | + |
| 159 | + Bool |
| 160 | +-SDL_NAME(XF86VidModeSwitchMode)(dpy, screen, zoom) |
| 161 | +- Display* dpy; |
| 162 | +- int screen; |
| 163 | +- int zoom; |
| 164 | ++SDL_NAME(XF86VidModeSwitchMode)(Display *dpy, int screen, int zoom) |
| 165 | + { |
| 166 | + XExtDisplayInfo *info = find_display (dpy); |
| 167 | + xXF86VidModeSwitchModeReq *req; |
| 168 | +@@ -788,10 +794,11 @@ SDL_NAME(XF86VidModeSwitchMode)(dpy, screen, zoom) |
| 169 | + } |
| 170 | + |
| 171 | + Bool |
| 172 | +-SDL_NAME(XF86VidModeSwitchToMode)(dpy, screen, modeline) |
| 173 | +- Display* dpy; |
| 174 | +- int screen; |
| 175 | +- SDL_NAME(XF86VidModeModeInfo)* modeline; |
| 176 | ++SDL_NAME(XF86VidModeSwitchToMode)( |
| 177 | ++ Display *dpy, |
| 178 | ++ int screen, |
| 179 | ++ SDL_NAME(XF86VidModeModeInfo) *modeline |
| 180 | ++) |
| 181 | + { |
| 182 | + XExtDisplayInfo *info = find_display (dpy); |
| 183 | + xXF86VidModeSwitchToModeReq *req; |
| 184 | +@@ -877,10 +884,7 @@ SDL_NAME(XF86VidModeSwitchToMode)(dpy, screen, modeline) |
| 185 | + } |
| 186 | + |
| 187 | + Bool |
| 188 | +-SDL_NAME(XF86VidModeLockModeSwitch)(dpy, screen, lock) |
| 189 | +- Display* dpy; |
| 190 | +- int screen; |
| 191 | +- int lock; |
| 192 | ++SDL_NAME(XF86VidModeLockModeSwitch)(Display *dpy, int screen, int lock) |
| 193 | + { |
| 194 | + XExtDisplayInfo *info = find_display (dpy); |
| 195 | + xXF86VidModeLockModeSwitchReq *req; |
| 196 | +@@ -899,10 +903,11 @@ SDL_NAME(XF86VidModeLockModeSwitch)(dpy, screen, lock) |
| 197 | + } |
| 198 | + |
| 199 | + Bool |
| 200 | +-SDL_NAME(XF86VidModeGetMonitor)(dpy, screen, monitor) |
| 201 | +- Display* dpy; |
| 202 | +- int screen; |
| 203 | +- SDL_NAME(XF86VidModeMonitor)* monitor; |
| 204 | ++SDL_NAME(XF86VidModeGetMonitor)( |
| 205 | ++ Display *dpy, |
| 206 | ++ int screen, |
| 207 | ++ SDL_NAME(XF86VidModeMonitor) *monitor |
| 208 | ++) |
| 209 | + { |
| 210 | + XExtDisplayInfo *info = find_display (dpy); |
| 211 | + xXF86VidModeGetMonitorReply rep; |
| 212 | +@@ -1000,10 +1005,7 @@ SDL_NAME(XF86VidModeGetMonitor)(dpy, screen, monitor) |
| 213 | + } |
| 214 | + |
| 215 | + Bool |
| 216 | +-SDL_NAME(XF86VidModeGetViewPort)(dpy, screen, x, y) |
| 217 | +- Display* dpy; |
| 218 | +- int screen; |
| 219 | +- int *x, *y; |
| 220 | ++SDL_NAME(XF86VidModeGetViewPort)(Display *dpy, int screen, int *x, int *y) |
| 221 | + { |
| 222 | + XExtDisplayInfo *info = find_display (dpy); |
| 223 | + xXF86VidModeGetViewPortReply rep; |
| 224 | +@@ -1053,10 +1055,7 @@ SDL_NAME(XF86VidModeGetViewPort)(dpy, screen, x, y) |
| 225 | + } |
| 226 | + |
| 227 | + Bool |
| 228 | +-SDL_NAME(XF86VidModeSetViewPort)(dpy, screen, x, y) |
| 229 | +- Display* dpy; |
| 230 | +- int screen; |
| 231 | +- int x, y; |
| 232 | ++SDL_NAME(XF86VidModeSetViewPort)(Display *dpy, int screen, int x, int y) |
| 233 | + { |
| 234 | + XExtDisplayInfo *info = find_display (dpy); |
| 235 | + xXF86VidModeSetViewPortReq *req; |
| 236 | +@@ -1077,11 +1076,14 @@ SDL_NAME(XF86VidModeSetViewPort)(dpy, screen, x, y) |
| 237 | + } |
| 238 | + |
| 239 | + Bool |
| 240 | +-SDL_NAME(XF86VidModeGetDotClocks)(dpy, screen, |
| 241 | +- flagsPtr, numclocksPtr, maxclocksPtr, clocksPtr) |
| 242 | +- Display* dpy; |
| 243 | +- int screen; |
| 244 | +- int *flagsPtr, *numclocksPtr, *maxclocksPtr, *clocksPtr[]; |
| 245 | ++SDL_NAME(XF86VidModeGetDotClocks)( |
| 246 | ++ Display *dpy, |
| 247 | ++ int screen, |
| 248 | ++ int *flagsPtr, |
| 249 | ++ int *numclocksPtr, |
| 250 | ++ int *maxclocksPtr, |
| 251 | ++ int *clocksPtr[] |
| 252 | ++) |
| 253 | + { |
| 254 | + XExtDisplayInfo *info = find_display (dpy); |
| 255 | + xXF86VidModeGetDotClocksReply rep; |
| 256 | + |
| 257 | +From e738cfffced8a006094d55337d917386582ada47 Mon Sep 17 00:00:00 2001 |
| 258 | + |
| 259 | +Date: Sat, 15 Oct 2022 15:10:48 -0700 |
| 260 | +Subject: [PATCH 2/2] Xext: Fix function declarations without a prototype |
| 261 | + |
| 262 | +This is not supported with the upcoming clang 16. |
| 263 | + |
| 264 | +error: a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition [-Werror,-Wdeprecated-non-prototype] |
| 265 | + |
| 266 | +reference: https://archives.gentoo.org/gentoo-dev/message/dd9f2d3082b8b6f8dfbccb0639e6e240 |
| 267 | +--- |
| 268 | + src/video/Xext/XME/xme.c | 2 +- |
| 269 | + src/video/Xext/Xinerama/Xinerama.c | 3 ++- |
| 270 | + src/video/Xext/Xv/Xv.c | 6 +++--- |
| 271 | + 3 files changed, 6 insertions(+), 5 deletions(-) |
| 272 | + |
| 273 | +diff --git a/src/video/Xext/XME/xme.c b/src/video/Xext/XME/xme.c |
| 274 | +index 2cead35ad..bb8d04d48 100644 |
| 275 | +--- a/src/video/Xext/XME/xme.c |
| 276 | ++++ b/src/video/Xext/XME/xme.c |
| 277 | +@@ -206,7 +206,7 @@ static char *xigmisc_extension_name = XIGMISC_PROTOCOL_NAME; |
| 278 | + /* |
| 279 | + * find_display - locate the display info block |
| 280 | + */ |
| 281 | +-static int XiGMiscCloseDisplay(); |
| 282 | ++static int XiGMiscCloseDisplay(Display*, XExtCodes*); |
| 283 | + |
| 284 | + static XExtensionHooks xigmisc_extension_hooks = { |
| 285 | + NULL, /* create_gc */ |
| 286 | +diff --git a/src/video/Xext/Xinerama/Xinerama.c b/src/video/Xext/Xinerama/Xinerama.c |
| 287 | +index 4ff42ebfe..57f64b9c3 100644 |
| 288 | +--- a/src/video/Xext/Xinerama/Xinerama.c |
| 289 | ++++ b/src/video/Xext/Xinerama/Xinerama.c |
| 290 | +@@ -50,7 +50,8 @@ static /* const */ char *panoramiX_extension_name = PANORAMIX_PROTOCOL_NAME; |
| 291 | + #define PanoramiXSimpleCheckExtension(dpy,i) \ |
| 292 | + XextSimpleCheckExtension (dpy, i, panoramiX_extension_name) |
| 293 | + |
| 294 | +-static int close_display(); |
| 295 | ++static int close_display(Display*, XExtCodes*); |
| 296 | ++ |
| 297 | + static /* const */ XExtensionHooks panoramiX_extension_hooks = { |
| 298 | + NULL, /* create_gc */ |
| 299 | + NULL, /* copy_gc */ |
| 300 | +diff --git a/src/video/Xext/Xv/Xv.c b/src/video/Xext/Xv/Xv.c |
| 301 | +index 7147b9e8c..c254a1dc2 100644 |
| 302 | +--- a/src/video/Xext/Xv/Xv.c |
| 303 | ++++ b/src/video/Xext/Xv/Xv.c |
| 304 | +@@ -63,9 +63,9 @@ static char *xv_extension_name = XvName; |
| 305 | + #define XvCheckExtension(dpy, i, val) \ |
| 306 | + XextCheckExtension(dpy, i, xv_extension_name, val) |
| 307 | + |
| 308 | +-static char *xv_error_string(); |
| 309 | +-static int xv_close_display(); |
| 310 | +-static Bool xv_wire_to_event(); |
| 311 | ++static char *xv_error_string(Display*, int, XExtCodes*, char*, int); |
| 312 | ++static int xv_close_display(Display*, XExtCodes*); |
| 313 | ++static Bool xv_wire_to_event(Display*, XEvent*, xEvent*); |
| 314 | + |
| 315 | + static XExtensionHooks xv_extension_hooks = { |
| 316 | + NULL, /* create_gc */ |
0 commit comments