trayer-srg icon indicating copy to clipboard operation
trayer-srg copied to clipboard

fails to compile: panel.c:315:5: error: too many arguments to function bg_init

Open NHOrus opened this issue 11 months ago • 1 comments

https://bugs.gentoo.org/944020

You declare void bg_init(); but it needs to have an argument, or modern C compilers refuse to pass it an argument

--- a/bg.h
+++ b/bg.h
@@ -9,7 +9,7 @@
 #include <glib.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
-void bg_init();
+void bg_init(Display *dpyn);
 void bg_rootbg_changed();
 GdkPixmap *bg_new_for_win(Window win);
 void modify_drawable(GdkDrawable *base, GdkGC *gc, guint32 tintcolor, gint alpha);

NHOrus avatar Jan 31 '25 08:01 NHOrus

Problem appears with C23, could be reproduced by compiling panel with GCC-14 or Clang-18 (or later) and -std=c23 or -std=gnu23 CFLAG appended

NHOrus avatar Jan 31 '25 10:01 NHOrus