Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2023 11:18:31 GMT
From:      =?utf-8?Q?Fernando=20Apestegu=C3=ADa?= <fernape@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 75c3b1ee6f83 - main - x11/kitty: add void to functions with empty parameter list
Message-ID:  <202303101118.32ABIVY1076818@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by fernape:

URL: https://cgit.FreeBSD.org/ports/commit/?id=75c3b1ee6f8398a8c4dedbda90611048ccd101c8

commit 75c3b1ee6f8398a8c4dedbda90611048ccd101c8
Author:     Trond Endrestol <Trond.Endrestol@ximalas.info>
AuthorDate: 2023-02-25 16:58:44 +0000
Commit:     Fernando ApesteguĂ­a <fernape@FreeBSD.org>
CommitDate: 2023-03-10 11:13:50 +0000

    x11/kitty: add void to functions with empty parameter list
    
    Clang 15 enforces the use of void in an otherwise empty parameter list.
    
    PR:             269814
    Reported by:    Trond.Endrestol@ximalas.info
    Approved by:    alexis.praga@free.fr (maintainer timeout > 2 weeks)
---
 x11/kitty/files/patch-glfw_dbus__glfw.c             | 20 ++++++++++++++++++++
 x11/kitty/files/patch-glfw_wl__window.c             | 17 +++++++++++++++++
 x11/kitty/files/patch-kittens_choose_unix__compat.c | 11 +++++++++++
 x11/kitty/files/patch-kitty_colors.c                | 20 ++++++++++++++++++++
 x11/kitty/files/patch-kitty_cursor.c                | 11 +++++++++++
 x11/kitty/files/patch-kitty_data-types.c            | 19 +++++++++++++++++++
 x11/kitty/files/patch-kitty_gl-wrapper.h            | 20 ++++++++++++++++++++
 x11/kitty/files/patch-kitty_gl.c                    | 11 +++++++++++
 x11/kitty/files/patch-kitty_glfw.c                  | 20 ++++++++++++++++++++
 x11/kitty/files/patch-kitty_graphics.c              | 11 +++++++++++
 x11/kitty/files/patch-kitty_line.c                  | 11 +++++++++++
 x11/kitty/files/patch-kitty_mouse.c                 | 20 ++++++++++++++++++++
 x11/kitty/files/patch-kitty_shaders.c               | 20 ++++++++++++++++++++
 x11/kitty/files/patch-kitty_state.c                 | 11 +++++++++++
 14 files changed, 222 insertions(+)

diff --git a/x11/kitty/files/patch-glfw_dbus__glfw.c b/x11/kitty/files/patch-glfw_dbus__glfw.c
new file mode 100644
index 000000000000..85ea778b05d6
--- /dev/null
+++ b/x11/kitty/files/patch-glfw_dbus__glfw.c
@@ -0,0 +1,20 @@
+--- glfw/dbus_glfw.c.orig	2022-11-07 10:06:42 UTC
++++ glfw/dbus_glfw.c
+@@ -174,7 +174,7 @@ glfw_dbus_dispatch(DBusConnection *conn) {
+ }
+ 
+ void
+-glfw_dbus_session_bus_dispatch() {
++glfw_dbus_session_bus_dispatch(void) {
+     if (session_bus) glfw_dbus_dispatch(session_bus);
+ }
+ 
+@@ -344,7 +344,7 @@ glfw_dbus_connect_to_session_bus(void) {
+ }
+ 
+ DBusConnection *
+-glfw_dbus_session_bus() {
++glfw_dbus_session_bus(void) {
+     if (!session_bus) glfw_dbus_connect_to_session_bus();
+     return session_bus;
+ }
diff --git a/x11/kitty/files/patch-glfw_wl__window.c b/x11/kitty/files/patch-glfw_wl__window.c
new file mode 100644
index 000000000000..652ee6f5ece4
--- /dev/null
+++ b/x11/kitty/files/patch-glfw_wl__window.c
@@ -0,0 +1,17 @@
+--- glfw/wl_window.c.orig	2022-11-07 10:06:42 UTC
++++ glfw/wl_window.c
+@@ -1964,12 +1964,12 @@ primary_selection_copy_callback_done(void *data, struc
+     wl_callback_destroy(callback);
+ }
+ 
+-void _glfwSetupWaylandDataDevice() {
++void _glfwSetupWaylandDataDevice(void) {
+     _glfw.wl.dataDevice = wl_data_device_manager_get_data_device(_glfw.wl.dataDeviceManager, _glfw.wl.seat);
+     if (_glfw.wl.dataDevice) wl_data_device_add_listener(_glfw.wl.dataDevice, &data_device_listener, NULL);
+ }
+ 
+-void _glfwSetupWaylandPrimarySelectionDevice() {
++void _glfwSetupWaylandPrimarySelectionDevice(void) {
+     _glfw.wl.primarySelectionDevice = zwp_primary_selection_device_manager_v1_get_device(_glfw.wl.primarySelectionDeviceManager, _glfw.wl.seat);
+     if (_glfw.wl.primarySelectionDevice) zwp_primary_selection_device_v1_add_listener(_glfw.wl.primarySelectionDevice, &primary_selection_device_listener, NULL);
+ }
diff --git a/x11/kitty/files/patch-kittens_choose_unix__compat.c b/x11/kitty/files/patch-kittens_choose_unix__compat.c
new file mode 100644
index 000000000000..35b3ae9268d3
--- /dev/null
+++ b/x11/kitty/files/patch-kittens_choose_unix__compat.c
@@ -0,0 +1,11 @@
+--- kittens/choose/unix_compat.c.orig	2022-11-07 10:06:42 UTC
++++ kittens/choose/unix_compat.c
+@@ -19,7 +19,7 @@
+ #endif
+ 
+ int
+-cpu_count() {
++cpu_count(void) {
+     return sysconf(_SC_NPROCESSORS_ONLN);
+ }
+ 
diff --git a/x11/kitty/files/patch-kitty_colors.c b/x11/kitty/files/patch-kitty_colors.c
new file mode 100644
index 000000000000..15c60494844a
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_colors.c
@@ -0,0 +1,20 @@
+--- kitty/colors.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/colors.c
+@@ -47,7 +47,7 @@ init_FG_BG_table(void) {
+     }
+ }
+ 
+-PyObject* create_256_color_table() {
++PyObject* create_256_color_table(void) {
+     init_FG_BG_table();
+     PyObject *ans = PyTuple_New(arraysz(FG_BG_256));
+     if (ans == NULL) return PyErr_NoMemory();
+@@ -83,7 +83,7 @@ dealloc_cp(ColorProfile* self) {
+ }
+ 
+ ColorProfile*
+-alloc_color_profile() {
++alloc_color_profile(void) {
+     return (ColorProfile*)new_cp(&ColorProfile_Type, NULL, NULL);
+ }
+ 
diff --git a/x11/kitty/files/patch-kitty_cursor.c b/x11/kitty/files/patch-kitty_cursor.c
new file mode 100644
index 000000000000..08349bb6598e
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_cursor.c
@@ -0,0 +1,11 @@
+--- kitty/cursor.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/cursor.c
+@@ -321,7 +321,7 @@ copy(Cursor *self, PyObject *a UNUSED) {
+     return (PyObject*)cursor_copy(self);
+ }
+ 
+-Cursor *alloc_cursor() {
++Cursor *alloc_cursor(void) {
+     return (Cursor*)new(&Cursor_Type, NULL, NULL);
+ }
+ 
diff --git a/x11/kitty/files/patch-kitty_data-types.c b/x11/kitty/files/patch-kitty_data-types.c
new file mode 100644
index 000000000000..5c841378f385
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_data-types.c
@@ -0,0 +1,19 @@
+--- kitty/data-types.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/data-types.c
+@@ -40,14 +40,14 @@
+ #include <xlocale.h>
+ 
+ static PyObject*
+-user_cache_dir() {
++user_cache_dir(void) {
+     static char buf[1024];
+     if (!confstr(_CS_DARWIN_USER_CACHE_DIR, buf, sizeof(buf) - 1)) return PyErr_SetFromErrno(PyExc_OSError);
+     return PyUnicode_FromString(buf);
+ }
+ 
+ static PyObject*
+-process_group_map() {
++process_group_map(void) {
+     int num_of_processes = proc_listallpids(NULL, 0);
+     size_t bufsize = sizeof(pid_t) * (num_of_processes + 1024);
+     FREE_AFTER_FUNCTION pid_t *buf = malloc(bufsize);
diff --git a/x11/kitty/files/patch-kitty_gl-wrapper.h b/x11/kitty/files/patch-kitty_gl-wrapper.h
new file mode 100644
index 000000000000..3d8b89f3c401
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_gl-wrapper.h
@@ -0,0 +1,20 @@
+--- kitty/gl-wrapper.h.orig	2022-11-07 10:06:42 UTC
++++ kitty/gl-wrapper.h
+@@ -6146,7 +6146,7 @@ int gladLoadGLUserPtr( GLADuserptrloadfunc load, void 
+ int gladLoadGL( GLADloadfunc load) {
+     return gladLoadGLUserPtr( glad_gl_get_proc_from_userptr, GLAD_GNUC_EXTENSION (void*) load);
+ }
+-void gladInstallGLDebug() {
++void gladInstallGLDebug(void) {
+     glad_debug_glActiveTexture = glad_debug_impl_glActiveTexture;
+     glad_debug_glAttachShader = glad_debug_impl_glAttachShader;
+     glad_debug_glBeginConditionalRender = glad_debug_impl_glBeginConditionalRender;
+@@ -6517,7 +6517,7 @@ void gladInstallGLDebug() {
+     glad_debug_glViewport = glad_debug_impl_glViewport;
+     glad_debug_glWaitSync = glad_debug_impl_glWaitSync;
+ }
+-void gladUninstallGLDebug() {
++void gladUninstallGLDebug(void) {
+     glad_debug_glActiveTexture = glad_glActiveTexture;
+     glad_debug_glAttachShader = glad_glAttachShader;
+     glad_debug_glBeginConditionalRender = glad_glBeginConditionalRender;
diff --git a/x11/kitty/files/patch-kitty_gl.c b/x11/kitty/files/patch-kitty_gl.c
new file mode 100644
index 000000000000..83b688fd1e13
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_gl.c
@@ -0,0 +1,11 @@
+--- kitty/gl.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/gl.c
+@@ -39,7 +39,7 @@ check_for_gl_error(void UNUSED *ret, const char *name,
+ }
+ 
+ void
+-gl_init() {
++gl_init(void) {
+     static bool glad_loaded = false;
+     if (!glad_loaded) {
+         int gl_version = gladLoadGL(glfwGetProcAddress);
diff --git a/x11/kitty/files/patch-kitty_glfw.c b/x11/kitty/files/patch-kitty_glfw.c
new file mode 100644
index 000000000000..663733c59190
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_glfw.c
@@ -0,0 +1,20 @@
+--- kitty/glfw.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/glfw.c
+@@ -176,7 +176,7 @@ log_event(const char *format, ...) {
+ // callbacks {{{
+ 
+ void
+-update_os_window_references() {
++update_os_window_references(void) {
+     for (size_t i = 0; i < global_state.num_os_windows; i++) {
+         OSWindow *w = global_state.os_windows + i;
+         if (w->handle) glfwSetWindowUserPointer(w->handle, w);
+@@ -1395,7 +1395,7 @@ swap_window_buffers(OSWindow *os_window) {
+ }
+ 
+ void
+-wakeup_main_loop() {
++wakeup_main_loop(void) {
+     glfwPostEmptyEvent();
+ }
+ 
diff --git a/x11/kitty/files/patch-kitty_graphics.c b/x11/kitty/files/patch-kitty_graphics.c
new file mode 100644
index 000000000000..797047a55c2a
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_graphics.c
@@ -0,0 +1,11 @@
+--- kitty/graphics.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/graphics.c
+@@ -60,7 +60,7 @@ cache_size(const GraphicsManager *self) { return disk_
+ 
+ 
+ GraphicsManager*
+-grman_alloc() {
++grman_alloc(void) {
+     GraphicsManager *self = (GraphicsManager *)GraphicsManager_Type.tp_alloc(&GraphicsManager_Type, 0);
+     self->images_capacity = self->capacity = 64;
+     self->images = calloc(self->images_capacity, sizeof(Image));
diff --git a/x11/kitty/files/patch-kitty_line.c b/x11/kitty/files/patch-kitty_line.c
new file mode 100644
index 000000000000..c8e33052545e
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_line.c
@@ -0,0 +1,11 @@
+--- kitty/line.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/line.c
+@@ -944,7 +944,7 @@ PyTypeObject Line_Type = {
+     .tp_new = new
+ };
+ 
+-Line *alloc_line() {
++Line *alloc_line(void) {
+     Line *ans = (Line*)PyType_GenericAlloc(&Line_Type, 0);
+     ans->needs_free = 0;
+     return ans;
diff --git a/x11/kitty/files/patch-kitty_mouse.c b/x11/kitty/files/patch-kitty_mouse.c
new file mode 100644
index 000000000000..3c66acf716c0
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_mouse.c
@@ -0,0 +1,20 @@
+--- kitty/mouse.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/mouse.c
+@@ -639,7 +639,7 @@ closest_window_for_event(unsigned int *window_idx) {
+ }
+ 
+ void
+-focus_in_event() {
++focus_in_event(void) {
+     // Ensure that no URL is highlighted and the mouse cursor is in default shape
+     bool in_tab_bar;
+     unsigned int window_idx = 0;
+@@ -653,7 +653,7 @@ focus_in_event() {
+ }
+ 
+ void
+-enter_event() {
++enter_event(void) {
+ #ifdef __APPLE__
+     // On cocoa there is no way to configure the window manager to
+     // focus windows on mouse enter, so we do it ourselves
diff --git a/x11/kitty/files/patch-kitty_shaders.c b/x11/kitty/files/patch-kitty_shaders.c
new file mode 100644
index 000000000000..9b6fe49153ff
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_shaders.c
@@ -0,0 +1,20 @@
+--- kitty/shaders.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/shaders.c
+@@ -223,7 +223,7 @@ init_cell_program(void) {
+ #define CELL_BUFFERS enum { cell_data_buffer, selection_buffer, uniform_buffer };
+ 
+ ssize_t
+-create_cell_vao() {
++create_cell_vao(void) {
+     ssize_t vao_idx = create_vao();
+ #define A(name, size, dtype, offset, stride) \
+     add_attribute_to_vao(CELL_PROGRAM, vao_idx, #name, \
+@@ -246,7 +246,7 @@ create_cell_vao() {
+ }
+ 
+ ssize_t
+-create_graphics_vao() {
++create_graphics_vao(void) {
+     ssize_t vao_idx = create_vao();
+     add_buffer_to_vao(vao_idx, GL_ARRAY_BUFFER);
+     add_attribute_to_vao(GRAPHICS_PROGRAM, vao_idx, "src", 4, GL_FLOAT, 0, NULL, 0);
diff --git a/x11/kitty/files/patch-kitty_state.c b/x11/kitty/files/patch-kitty_state.c
new file mode 100644
index 000000000000..6107f027f8dd
--- /dev/null
+++ b/x11/kitty/files/patch-kitty_state.c
@@ -0,0 +1,11 @@
+--- kitty/state.c.orig	2022-11-07 10:06:42 UTC
++++ kitty/state.c
+@@ -187,7 +187,7 @@ free_bgimage(BackgroundImage **bgimage, bool release_t
+ }
+ 
+ OSWindow*
+-add_os_window() {
++add_os_window(void) {
+     WITH_OS_WINDOW_REFS
+     ensure_space_for(&global_state, os_windows, OSWindow, global_state.num_os_windows + 1, capacity, 1, true);
+     OSWindow *ans = global_state.os_windows + global_state.num_os_windows++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202303101118.32ABIVY1076818>