• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Compile with Optimization fails / timedate missing
#1
Hello,

if I compile the GIT version with this usual gcc flags (in compile.sh)
Code:
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="-fomit-frame-pointer -march=native -O2" -DCMAKE_CXX_FLAGS="-march=native -O2"

I'll get this (additional) warnings
Code:
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c: In function ‘plua_config_device_datetime_get_table’:
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:301:6: warning: ‘tm.tm_wday’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int weekday = tm.tm_wday;
      ^~~~~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:295:23: warning: ‘tm.tm_year’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int year = tm.tm_year+1900;
             ~~~~~~~~~~^~~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:296:23: warning: ‘tm.tm_mon’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int month = tm.tm_mon+1;
              ~~~~~~~~~^~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:297:6: warning: ‘tm.tm_mday’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int day = tm.tm_mday;
      ^~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:298:6: warning: ‘tm.tm_hour’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int hour = tm.tm_hour;
      ^~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:299:6: warning: ‘tm.tm_min’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int minute = tm.tm_min;
      ^~~~~~
/usr/local/src/pilight/libs/pilight/lua_c/config/devices/datetime.c:300:6: warning: ‘tm.tm_sec’ may be used uninitialized in this function [-Wmaybe-uninitialized]
  int second = tm.tm_sec;
      ^~~~~~

but package builds normally (debian stretch / rpi2), just to fail later after install and start complaining about missing timedate protocol.

Any hints, what could have gone wrong?
(btw '-march=native -O0 works')

Stefan
 
Reply
  


Messages In This Thread
Compile with Optimization fails / timedate missing - by fourty2 - 04-13-2019, 05:13 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  pilight fails starting on boot Alex 5 466 06-09-2019, 06:02 PM
Last Post: curlymo
  arctech_contact protocol missing open/close signals Niek 2 584 12-23-2017, 07:16 PM
Last Post: Niek
Question window sensor's very first signal goes missing baf 1 671 11-14-2017, 10:36 PM
Last Post: curlymo
  rule fails with ping state pinu 1 888 06-09-2017, 10:14 AM
Last Post: Niek
  cannot compile pilight on SLES 11.4 wseifert 0 706 06-09-2017, 05:59 AM
Last Post: wseifert
  config device #1 "living", missing protocol jjlf 5 1,835 11-08-2016, 11:55 PM
Last Post: jjlf
  new install fails - dev/nightly gneandr 11 8,902 01-29-2016, 11:30 AM
Last Post: WEBcast
  SSDP error and or missing protocol rudig 5 2,367 01-29-2016, 08:57 AM
Last Post: rudig

Forum Jump:


Browsing: 1 Guest(s)