]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1930: compiler warnings with clang-17 v9.0.1930
authorDominique Pellé <dominique.pelle@tomtom.com>
Sun, 24 Sep 2023 14:12:07 +0000 (16:12 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 24 Sep 2023 14:16:06 +0000 (16:16 +0200)
Problem:  compiler warnings with clang-17
Solution: Fix function prototypes and function pointer

fix: clang compilation warnings with -Wstrict-prototypes

Change fixes this kind of compilation warnings with clang:
```
proto/if_python3.pro:13:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
   13 | int python3_version();
      |                    ^
      |                     void
```

closes: #13166

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
src/debugger.c
src/if_python3.c
src/os_unix.c
src/proto/if_python3.pro
src/version.c

index 66647ab4649183b1a50a0a55e14746c1a6b1862f..5508ea33fc4ef5b463e529beb86a8005c5503585 100644 (file)
@@ -1000,7 +1000,7 @@ has_profiling(
 }
 
     static void
-prof_clear_cache()
+prof_clear_cache(void)
 {
     if (!prof_cache_initialized)
     {
index 9d53cafc74e230dffd384faffab48eccf0f77232..a04cca31ae50876c86074c592d78ef684ed07129 100644 (file)
@@ -2070,7 +2070,7 @@ set_ref_in_python3(int copyID)
 }
 
     int
-python3_version()
+python3_version(void)
 {
 #ifdef USE_LIMITED_API
     return Py_LIMITED_API;
index 31f66b1371c2c7584c6f5ef85979b52b77fd7b6f..45c6b440a5b7632b8c0e5f3130f848ec191275ce 100644 (file)
@@ -1858,7 +1858,7 @@ ex_xrestore(exarg_T *eap)
     static int
 test_x11_window(Display *dpy)
 {
-    int                        (*old_handler)();
+    int                        (*old_handler)(Display*, XErrorEvent*);
     XTextProperty      text_prop;
 
     old_handler = XSetErrorHandler(x_error_check);
@@ -7781,9 +7781,9 @@ setup_term_clip(void)
     open_app_context();
     if (app_context != NULL && xterm_Shell == (Widget)0)
     {
-       int (*oldhandler)();
+       int (*oldhandler)(Display*, XErrorEvent*);
 # if defined(USING_SETJMP)
-       int (*oldIOhandler)();
+       int (*oldIOhandler)(Display*);
 # endif
 # ifdef ELAPSED_FUNC
        elapsed_T start_tv;
index d2bcd8c5a044560d6b4aab7aa0a8ba38fdd3a928..0e139b99023c82bbe823a0781996dd79a2e2219f 100644 (file)
@@ -10,5 +10,5 @@ void python3_window_free(win_T *win);
 void python3_tabpage_free(tabpage_T *tab);
 void do_py3eval(char_u *str, typval_T *rettv);
 int set_ref_in_python3(int copyID);
-int python3_version();
+int python3_version(void);
 /* vim: set ft=c : */
index c258d7b4e7bdca84370a782534eea81d13e182cb..f30b08e4ae3d971d3e9a8078a7ec6be5b6bfac1b 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1930,
 /**/
     1929,
 /**/