otrv4 / pidgin-otrng

Fork of https://bugs.otr.im/plugins/pidgin-otr. This is a mirror of https://bugs.otr.im/otrv4/pidgin-otrng
GNU General Public License v2.0
16 stars 5 forks source link

Warning on plugin #41

Closed deniscostadsc closed 6 years ago

deniscostadsc commented 6 years ago

Description

When I compile the plugin on my machine I see the following warnings:

make  all-recursive
make[1]: Entering directory '/home/denis/projects/pidgin-otrng'
Making all in po
make[2]: Entering directory '/home/denis/projects/pidgin-otrng/po'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/denis/projects/pidgin-otrng/po'
Making all in test
make[2]: Entering directory '/home/denis/projects/pidgin-otrng/test'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/denis/projects/pidgin-otrng/test'
make[2]: Entering directory '/home/denis/projects/pidgin-otrng'
  CC       otrng-plugin.lo
  CC       prekey-plugin.lo
  CC       prekey-discovery.lo
  CC       prekey-discovery-jabber.lo
  CC       plugin-all.lo
plugin-all.c: In function ‘smp_update_v4’:
plugin-all.c:1914:5: warning: this statement may fall through [-Wimplicit-fallthrough=]
     otrng_plugin_abort_smp(conv); // fallthrough intended
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
plugin-all.c:1915:3: note: here
   case OTRNG_SMP_EVENT_ABORT:
   ^~~~
  CC       ui.lo
  CC       dialogs.lo
  CC       gtk-ui.lo
  CC       gtk-dialog.lo
gtk-dialog.c: In function ‘otr_icon’:
gtk-dialog.c:208:3: warning: ‘gdk_pixbuf_new_from_inline’ is deprecated [-Wdeprecated-declarations]
   pixbuf = gdk_pixbuf_new_from_inline(-1, data, FALSE, NULL);
   ^~~~~~
In file included from /usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h:34:0,
                 from /usr/include/gtk-2.0/gdk/gdkpixbuf.h:37,
                 from /usr/include/gtk-2.0/gdk/gdkcairo.h:28,
                 from /usr/include/gtk-2.0/gdk/gdk.h:33,
                 from /usr/include/gtk-2.0/gtk/gtk.h:32,
                 from gtk-dialog.c:28:
/usr/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h:362:12: note: declared here
 GdkPixbuf* gdk_pixbuf_new_from_inline (gint          data_length,
            ^~~~~~~~~~~~~~~~~~~~~~~~~~
gtk-dialog.c: In function ‘start_or_continue_smp’:
gtk-dialog.c:316:45: warning: pointer targets in passing argument 2 of ‘otrng_plugin_start_smp’ differ in signedness [-Wpointer-sign]
       otrng_plugin_start_smp(smppair->conv, user_question, 0,
                                             ^~~~~~~~~~~~~
In file included from ./dialogs.h:33:0,
                 from gtk-dialog.h:25,
                 from gtk-dialog.c:65:
./plugin-all.h:105:6: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
 void otrng_plugin_start_smp(otrng_plugin_conversation *conv,
      ^~~~~~~~~~~~~~~~~~~~~~
gtk-dialog.c:319:45: warning: pointer targets in passing argument 2 of ‘otrng_plugin_start_smp’ differ in signedness [-Wpointer-sign]
       otrng_plugin_start_smp(smppair->conv, user_question,
                                             ^~~~~~~~~~~~~
In file included from ./dialogs.h:33:0,
                 from gtk-dialog.h:25,
                 from gtk-dialog.c:65:
./plugin-all.h:105:6: note: expected ‘const unsigned char *’ but argument is of type ‘const char *’
 void otrng_plugin_start_smp(otrng_plugin_conversation *conv,
      ^~~~~~~~~~~~~~~~~~~~~~
gtk-dialog.c: In function ‘otrng_gtk_dialog_clicked_connect’:
gtk-dialog.c:1829:18: warning: unused variable ‘account’ [-Wunused-variable]
   PurpleAccount *account = purple_conversation_get_account(conv);
                  ^~~~~~~
gtk-dialog.c: In function ‘check_incoming_instance_change’:
gtk-dialog.c:3137:16: warning: variable ‘current_out’ set but not used [-Wunused-but-set-variable]
   ConnContext *current_out = NULL;
                ^~~~~~~~~~~
  CC       tooltipmenu.lo
  CC       otrng-client.lo
  CCLD     pidgin-otrng.la
make[2]: Leaving directory '/home/denis/projects/pidgin-otrng'
make[1]: Leaving directory '/home/denis/projects/pidgin-otrng'
olabini commented 6 years ago

I've fixed all the warnings produced here, except the one about the pixbuf - the fix here is larger and might require different code for different versions of GDK which I don't think is worth it. That's why I closed this issue.