Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.1.1: LTO linking time warnings and all other compile time warnings #6215

Open
kloczek opened this issue May 20, 2020 · 2 comments
Open

2.1.1: LTO linking time warnings and all other compile time warnings #6215

kloczek opened this issue May 20, 2020 · 2 comments

Comments

@kloczek
Copy link

kloczek commented May 20, 2020

/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/winpr/libwinpr/sspi/NTLM/ntlm_compute.c:661:12: warning: 'ntlm_generate_sealing_key' defined but not used [-Wunused-function]
  661 | static int ntlm_generate_sealing_key(BYTE* exported_session_key, PSecBuffer seal_magic,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/crypto/per.c:376:13: warning: 'per_write_string' defined but not used [-Wunused-function]
  376 | static void per_write_string(wStream* s, BYTE* str, int length)
      |             ^~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/cache/nine_grid.c:108:6: warning: 'nine_grid_cache_put' defined but not used [-Wunused-function]
  108 | void nine_grid_cache_put(rdpNineGridCache* nine_grid, UINT32 index, void* entry)
      |      ^~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/cache/nine_grid.c:87:7: warning: 'nine_grid_cache_get' defined but not used [-Wunused-function]
   87 | void* nine_grid_cache_get(rdpNineGridCache* nine_grid, UINT32 index)
      |       ^~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/cache/palette.c:54:7: warning: 'palette_cache_get' defined but not used [-Wunused-function]
   54 | void* palette_cache_get(rdpPaletteCache* paletteCache, UINT32 index)
      |       ^~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/locale/keyboard.c:64:12: warning: 'freerdp_keyboard_init_apple' defined but not used [-Wunused-function]
   64 | static int freerdp_keyboard_init_apple(DWORD* keyboardLayoutId,
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/locale/keyboard_x11.c:149:14: warning: 'freerdp_detect_keymap_from_xkb' defined but not used [-Wunused-function]
  149 | static char* freerdp_detect_keymap_from_xkb(void)
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/crypto/crypto.c:215:12: warning: 'crypto_rsa_decrypt' defined but not used [-Wunused-function]
  215 | static int crypto_rsa_decrypt(const BYTE* input, int length, UINT32 key_length, const BYTE* modulus,
      |            ^~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/tcp.c:462:13: warning: 'transport_bio_buffered_callback' defined but not used [-Wunused-function]
  462 | static long transport_bio_buffered_callback(BIO* bio, int mode, const char* argp, int argi,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/tcp.c:103:13: warning: 'transport_bio_simple_callback' defined but not used [-Wunused-function]
  103 | static long transport_bio_simple_callback(BIO* bio, int mode, const char* argp, int argi, long argl,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/activation.c:162:13: warning: 'rdp_write_persistent_list_entry' defined but not used [-Wunused-function]
  162 | static void rdp_write_persistent_list_entry(wStream* s, UINT32 key1, UINT32 key2)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gcc.c:2017:6: warning: 'gcc_write_server_multitransport_channel_data' defined but not used [-Wunused-function]
 2017 | void gcc_write_server_multitransport_channel_data(wStream* s, rdpMcs* mcs)
      |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/autodetect.c:319:13: warning: 'autodetect_send_netchar_sync' defined but not used [-Wunused-function]
  319 | static BOOL autodetect_send_netchar_sync(rdpRdp* rdp, UINT16 sequenceNumber)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/connection.c:188:13: warning: 'rdp_send_server_control_granted_pdu' declared 'static' but never defined [-Wunused-function]
  188 | static BOOL rdp_send_server_control_granted_pdu(rdpRdp* rdp);
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/codec/audio.c:257:13: warning: 'audio_format_valid' defined but not used [-Wunused-function]
  257 | static BOOL audio_format_valid(const AUDIO_FORMAT* format)
      |             ^~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/capabilities.c:2151:13: warning: 'rdp_write_draw_gdiplus_cache_capability_set' defined but not used [-Wunused-function]
 2151 | static BOOL rdp_write_draw_gdiplus_cache_capability_set(wStream* s, const rdpSettings* settings)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/codec/nsc_encode.c:421:15: warning: 'nsc_compute_byte_count' defined but not used [-Wunused-function]
  421 | static UINT32 nsc_compute_byte_count(NSC_CONTEXT* context, UINT32* ByteCount, UINT32 width,
      |               ^~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:518:12: warning: 'rts_send_keep_alive_pdu' defined but not used [-Wunused-function]
  518 | static int rts_send_keep_alive_pdu(rdpRpc* rpc)
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:387:12: warning: 'rts_ping_traffic_sent_notify_command_write' defined but not used [-Wunused-function]
  387 | static int rts_ping_traffic_sent_notify_command_write(BYTE* buffer, UINT32 PingTrafficSent)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:381:12: warning: 'rts_ping_traffic_sent_notify_command_read' defined but not used [-Wunused-function]
  381 | static int rts_ping_traffic_sent_notify_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:344:12: warning: 'rts_association_group_id_command_read' defined but not used [-Wunused-function]
  344 | static int rts_association_group_id_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:314:12: warning: 'rts_client_address_command_write' defined but not used [-Wunused-function]
  314 | static int rts_client_address_command_write(BYTE* buffer, UINT32 AddressType, BYTE* ClientAddress)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:285:12: warning: 'rts_ance_command_write' defined but not used [-Wunused-function]
  285 | static int rts_ance_command_write(BYTE* buffer)
      |            ^~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:280:12: warning: 'rts_ance_command_read' defined but not used [-Wunused-function]
  280 | static int rts_ance_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:270:12: warning: 'rts_negative_ance_command_write' defined but not used [-Wunused-function]
  270 | static int rts_negative_ance_command_write(BYTE* buffer)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:265:12: warning: 'rts_negative_ance_command_read' defined but not used [-Wunused-function]
  265 | static int rts_negative_ance_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:253:12: warning: 'rts_padding_command_write' defined but not used [-Wunused-function]
  253 | static int rts_padding_command_write(BYTE* buffer, UINT32 ConformanceCount)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:230:12: warning: 'rts_empty_command_read' defined but not used [-Wunused-function]
  230 | static int rts_empty_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:191:12: warning: 'rts_client_keepalive_command_read' defined but not used [-Wunused-function]
  191 | static int rts_client_keepalive_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:174:12: warning: 'rts_channel_lifetime_command_read' defined but not used [-Wunused-function]
  174 | static int rts_channel_lifetime_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:157:12: warning: 'rts_cookie_command_read' defined but not used [-Wunused-function]
  157 | static int rts_cookie_command_read(rdpRpc* rpc, BYTE* buffer, UINT32 length)
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/libfreerdp/core/gateway/rts.c:146:12: warning: 'rts_connection_timeout_command_write' defined but not used [-Wunused-function]
  146 | static int rts_connection_timeout_command_write(BYTE* buffer, UINT32 ConnectionTimeout)
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
Using "code" is deprecated - use private-code or public-code.
See the help page for details.
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/channels/rdpei/client/rdpei_main.c:236:13: warning: 'rdpei_print_contact_flags' defined but not used [-Wunused-function]
  236 | static void rdpei_print_contact_flags(UINT32 contactFlags)
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/uwac/libuwac/uwac-display.c:328:13: warning: 'UwacDisplayUnwatchFd' defined but not used [-Wunused-function]
  328 | static void UwacDisplayUnwatchFd(UwacDisplay* display, int fd)
      |             ^~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/uwac/libuwac/uwac-display.c:311:14: warning: 'display_bind' defined but not used [-Wunused-function]
  311 | static void* display_bind(UwacDisplay* display, uint32_t name, const struct wl_interface* interface,
      |              ^~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/server/shadow/X11/x11_shadow.c:614:12: warning: 'x11_shadow_blend_cursor' defined but not used [-Wunused-function]
  614 | static int x11_shadow_blend_cursor(x11ShadowSubsystem* subsystem)
      |            ^~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/server/shadow/X11/x11_shadow.c:594:13: warning: 'x11_shadow_validate_region' defined but not used [-Wunused-function]
  594 | static void x11_shadow_validate_region(x11ShadowSubsystem* subsystem, int x, int y, int width,
      |             ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/channels/client/tables.c:105:13: warning: type of 'cups_freerdp_printer_client_subsystem_entry' does not match original declaration [-Wlto-type-mismatch]
  105 | extern UINT cups_freerdp_printer_client_subsystem_entry(void*);
      |             ^
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/channels/printer/client/cups/printer_cups.c:384:19: note: return value type mismatch
  384 | rdpPrinterDriver* cups_freerdp_printer_client_subsystem_entry(void)
      |                   ^
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/channels/printer/client/cups/printer_cups.c:384:19: note: 'cups_freerdp_printer_client_subsystem_entry' was previously declared here
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/channels/printer/client/cups/printer_cups.c:384:19: note: code may be misoptimized unless '-fno-strict-aliasing' is used
/home/tkloczko/rpmbuild/BUILD/FreeRDP-2.1.1/client/Wayland/wlf_disp.c:261:6: warning: 'wlf_disp_sendLayout' defined but not used [-Wunused-function]
  261 | UINT wlf_disp_sendLayout(DispClientContext* disp, rdpMonitor* monitors, size_t nmonitors)
      |      ^~~~~~~~~~~~~~~~~~~
@kloczek kloczek changed the title 2.1.1: LTO lining time warnings and all other compile time warnings 2.1.1: LTO linking time warnings and all other compile time warnings May 20, 2020
@akallabeth
Copy link
Member

these warnings are unused functions, so anyone investigating which ones could still be used (and which ones not) would be great.

@kloczek
Copy link
Author

kloczek commented May 20, 2020

Just to let you know. On linking time LTO automatically removes code of unused functions from generated DSO.
Your project is using cmake so here is example how to define using cmake precise/exact ABI definition in sym/ver linker script.

Please have look on:
https://github.com/openSUSE/libsolv/blob/master/src/CMakeLists.txt
and
https://github.com/openSUSE/libsolv/blob/master/src/libsolv.ver

So far I did not found that LTO optimised FreeRDP DSO is causing some missing symbols when symbols are resolved by ld.so so I';m almost sure that it is kind of dead code but I'm more just package working on scale of thousands packages than developer looking usually precisely on what happens with each library :)

My own automation processing all used an publicly provided symbols by all typical distribution still is is not finished and will be grinding all typical distro symbols for couple of days if not weeks so in mean time I cannot provide you precise answer is it anything around which is still using those symbols :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants