Bug 2259292

Summary: lxsession: Lower C type safety level to 2
Product: [Fedora] Fedora Reporter: Florian Weimer <fweimer>
Component: lxsessionAssignee: Mamoru TASAKA <mtasaka>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: mtasaka
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: lxsession-0.5.5^20230917gite0fffa66-1.fc40 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2024-01-19 23:32:36 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2137516    

Description Florian Weimer 2024-01-19 23:30:48 UTC
The package was changed not treat -Wincompatible-pointer-types as errors. I'm filing this bug purely for tracking purposes.

Reproducible: Always

Comment 1 Florian Weimer 2024-01-19 23:32:36 UTC
While this package contains Vala sources (which likely has problems due to Vala compiler C compatibility), there are also parts written in C with issues:

lxpolkit/lxpolkit-listener.c: In function ‘on_completed’:
lxpolkit/lxpolkit-listener.c:88:22: error: passing argument 1 of ‘show_msg’ from incompatible pointer type [-Wincompatible-pointer-types]
   88 |         show_msg(data->dlg, GTK_MESSAGE_ERROR, _("Authentication failed!\nWrong password?"));
      |                  ~~~~^~~~~
      |                      |
      |                      GtkWidget * {aka struct _GtkWidget *}
lxpolkit/lxpolkit.h:30:26: note: expected ‘GtkWindow *’ {aka ‘struct _GtkWindow *’} but argument is of type ‘GtkWidget *’ {aka ‘struct _GtkWidget *’}
   30 | void show_msg(GtkWindow* parent, GtkMessageType type, const char* msg);
      |               ~~~~~~~~~~~^~~~~~
lxpolkit/lxpolkit-listener.c:92:32: error: passing argument 1 of ‘gtk_entry_set_text’ from incompatible pointer type [-Wincompatible-pointer-types]
   92 |         gtk_entry_set_text(data->request, "");
      |                            ~~~~^~~~~~~~~
      |                                |
      |                                GtkWidget * {aka struct _GtkWidget *}
In file included from /usr/include/gtk-2.0/gtk/gtktreeview.h:31,
                 from /usr/include/gtk-2.0/gtk/gtkcombobox.h:29,
                 from /usr/include/gtk-2.0/gtk/gtk.h:72:
/usr/include/gtk-2.0/gtk/gtkentry.h:213:65: note: expected ‘GtkEntry *’ {aka ‘struct _GtkEntry *’} but argument is of type ‘GtkWidget *’ {aka ‘struct _GtkWidget *’}
  213 | void       gtk_entry_set_text                   (GtkEntry      *entry,
      |                                                  ~~~~~~~~~~~~~~~^~~~~
lxpolkit/lxpolkit-listener.c:94:29: error: passing argument 1 of ‘on_user_changed’ from incompatible pointer type [-Wincompatible-pointer-types]
   94 |         on_user_changed(data->id, data);
      |                         ~~~~^~~~
      |                             |
      |                             GtkWidget * {aka struct _GtkWidget *}
lxpolkit/lxpolkit-listener.c:65:42: note: expected ‘GtkComboBox *’ {aka ‘struct _GtkComboBox *’} but argument is of type ‘GtkWidget *’ {aka ‘struct _GtkWidget *’}
   65 | static void on_user_changed(GtkComboBox* id_combo, DlgData* data);
      |                             ~~~~~~~~~~~~~^~~~~~~~