Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5147 closed Bug (invalid)

Bunch of warnings when building with GCC 4.7

Reported by: pathetic_loser Owned by:
Priority: Normal Milestone: None Set
Component: Transmission Version: 2.73+
Severity: Normal Keywords: compiler warning
Cc:

Description

When building current SVN with GCC 4.7 there is bunch of warnings:
Configuration: ubuntu 12.04 64bit, gcc 4.7.2 on Transmission SVN (r13621 as of writing this bug).

natpmp.c:105:5: warning: no previous declaration for ‘sendpendingrequest’ [-Wmissing-declarations]
natpmp.c:121:5: warning: no previous declaration for ‘sendnatpmprequest’ [-Wmissing-declarations]
natpmp.c:186:13: warning: no previous declaration for ‘readnatpmpresponse’ [-Wmissing-declarations]
portlistingparse.c: In function ‘endelt’:
portlistingparse.c:71:31: warning: unused parameter ‘name’ [-Wunused-parameter]
portlistingparse.c:71:41: warning: unused parameter ‘l’ [-Wunused-parameter]
peer-io.c:527:1: warning: initialization from incompatible pointer type [enabled by default]
peer-io.c:527:1: warning: (near initialization for ‘utp_function_table.on_overhead’) [enabled by default]
peer-io.c:582:1: warning: initialization from incompatible pointer type [enabled by default]
peer-io.c:582:1: warning: (near initialization for ‘dummy_utp_function_table.on_overhead’) [enabled by default]
main.c: In function ‘on_rpc_changed’:
main.c:376:5: warning: ‘gdk_threads_enter’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Wdeprecated-declarations]
main.c:449:5: warning: ‘gdk_threads_leave’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Wdeprecated-declarations]
main.c: In function ‘session_close_threadfunc’:
main.c:897:5: warning: ‘gdk_threads_enter’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Wdeprecated-declarations]
main.c:900:5: warning: ‘gdk_threads_leave’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Wdeprecated-declarations]
transmission-resources.c:597:1: warning: missing initializer [-Wmissing-field-initializers]
transmission-resources.c:597:1: warning: (near initialization for ‘static_resource.resource’) [-Wmissing-field-initializers]
tr-prefs.c: In function ‘onCorePrefsChanged’:
tr-prefs.c:1142:9: warning: ‘gdk_threads_enter’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Wdeprecated-declarations]
tr-prefs.c:1146:9: warning: ‘gdk_threads_leave’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Wdeprecated-declarations]
tr-prefs.c: In function ‘onPortTested’:
tr-prefs.c:1166:5: warning: ‘gdk_threads_enter’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Wdeprecated-declarations]
tr-prefs.c:1170:5: warning: ‘gdk_threads_leave’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Wdeprecated-declarations]

Change History (3)

comment:1 in reply to: ↑ description Changed 8 years ago by jordan

This is a grab bag of unrelated issues:

> natpmp.c:105:5: warning: no previous declaration for ‘sendpendingrequest’ [-Wmissing-declarations]
> natpmp.c:121:5: warning: no previous declaration for ‘sendnatpmprequest’ [-Wmissing-declarations]
> natpmp.c:186:13: warning: no previous declaration for ‘readnatpmpresponse’ [-Wmissing-declarations]
> portlistingparse.c: In function ‘endelt’:
> portlistingparse.c:71:31: warning: unused parameter ‘name’ [-Wunused-parameter]
> portlistingparse.c:71:41: warning: unused parameter ‘l’ [-Wunused-parameter]

These are upstream issues, not Transmission ones.

> peer-io.c:527:1: warning: initialization from incompatible pointer type [enabled by default]
> peer-io.c:527:1: warning: (near initialization for ‘utp_function_table.on_overhead’) [enabled by default]
> peer-io.c:582:1: warning: initialization from incompatible pointer type [enabled by default]
> peer-io.c:582:1: warning: (near initialization for ‘dummy_utp_function_table.on_overhead’) [enabled by default]

Fixed in trunk. Looks like libutp has a different typedef for bool in C than transmission.h does. :)

> main.c: In function ‘on_rpc_changed’:
> main.c:376:5: warning: ‘gdk_threads_enter’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Wdeprecated-declarations]
> main.c:449:5: warning: ‘gdk_threads_leave’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Wdeprecated-declarations]
> main.c: In function ‘session_close_threadfunc’:
> main.c:897:5: warning: ‘gdk_threads_enter’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:45) [-Wdeprecated-declarations]
> main.c:900:5: warning: ‘gdk_threads_leave’ is deprecated (declared at /usr/include/gtk-3.0/gdk/gdkthreads.h:47) [-Wdeprecated-declarations]

I've given this its own ticket, #5203

> transmission-resources.c:597:1: warning: missing initializer [-Wmissing-field-initializers]
> transmission-resources.c:597:1: warning: (near initialization for ‘static_resource.resource’) [-Wmissing-field-initializers]

This is an auto-generated file.

comment:2 Changed 8 years ago by jordan

  • Resolution set to invalid
  • Status changed from new to closed

comment:3 Changed 8 years ago by jordan

I'm marking this ticket as invalid because it contains separate unrelated items in transmission's code, as well as items outside of Transmission's control (upstream files, auto-generated files).

The Transmission-specific issues are either fixed (such as the peer-io libutp bool warning) or have been given their own ticket (such as #5203).

Note: See TracTickets for help on using tickets.