Bug 2259292 - lxsession: Lower C type safety level to 2
Summary: lxsession: Lower C type safety level to 2
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lxsession
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Mamoru TASAKA
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: PortingToModernCExemptions
TreeView+ depends on / blocked
 
Reported: 2024-01-19 23:30 UTC by Florian Weimer
Modified: 2024-01-19 23:32 UTC (History)
1 user (show)

Fixed In Version: lxsession-0.5.5^20230917gite0fffa66-1.fc40
Clone Of:
Environment:
Last Closed: 2024-01-19 23:32:36 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

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);
      |                             ~~~~~~~~~~~~~^~~~~~~~


Note You need to log in before you can comment on or make changes to this bug.