Error building master(1.13.0) with Yocto
Hi,
As discussed in the previous MR, I'm getting errors while building master with yocto. Here are the configure infos and build errors. I didn't do any tweek to the build config, I'm using my default ones. This could be a solution. Or a code change could also do the trick. If you think a patch could do the trick, I would be happy to help.
ModemManager 1.13.0
==============================================
Build:
compiler: arm-linux-gnueabi-gcc -mthumb -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a9 -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wformat -Wformat-securit
y -Werror=format-security --sysroot=/home/dkhouya/projects/build/tmp/work/cortexa9t2hf-neon-linux-gnueabi/modemmanager/1.12.8-r0/recipe-sysroot
cflags: -O2 -pipe -g -feliminate-unused-debug-types -fmacro-prefix-map=/home/dkhouya/projects/build/tmp/work/cortexa9t2hf-neon-linux-gnueabi/modem
manager/1.12.8-r0=/usr/src/debug/modemmanager/1.12.8-r0 -fdebug-prefix-map=/home/dkhouya/projects/build/tmp/work/cortexa9t2hf-neon-linux-gnueabi/mode
mmanager/1.12.8-r0=/usr/src/debug/modemmanager/1.12.8-r0 -fdebug-prefix-map=/home/dkhouya/projects/build/tmp/work/cortexa9t2hf-neon-linux-gnueabi/mod
emmanager/1.12.8-r0/recipe-sysroot= -fdebug-prefix-map=/home/dkhouya/projects/build/tmp/work/cortexa9t2hf-neon-linux-gnueabi/modemmanager/1.12.8-r0/r
ecipe-sysroot-native= -std=gnu89
ldflags: -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now
warn cflags: -fno-strict-aliasing -Wall -Wextra -Wundef -Wwrite-strings -Wpointer-arith -Wmissing-declarations -Wredundant-decls -Wno-unused-parameter -Wno-missing-fie
ld-initializers -Wformat=2 -Wcast-align -Wformat-nonliteral -Wformat-security -Wsign-compare -Wstrict-aliasing -Wshadow -Winline -Wpacked -Wmissing-format-attribute -Wmissing-noreturn -
Winit-self -Wmissing-include-dirs -Wunused-but-set-variable -Warray-bounds -Wreturn-type -Wswitch-enum -Wswitch-default -Wduplicated-cond -Wduplicated-branches -Wlogical-op -Wrestrict -
Wnull-dereference -Wdouble-promotion -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wdeclaration-after-statement -Wimplicit-function-declaration -Wold-style-definition -Wjum
p-misses-init -Werror -Wno-suggest-attribute=format -Wno-error=unused-parameter -Wno-error=missing-field-initializers -Wno-cast-function-type -Wno-packed -Wno-error=cast-function-type -
Wno-error=packed
warn ldflags: -Wl,--no-as-needed -Wl,--fatal-warnings
maintainer mode: yes
release: no
System paths:
prefix: /usr
D-Bus system directory: /etc/dbus-1/system.d
udev base directory: /lib/udev
systemd unit directory: /lib/systemd/system/
Features:
udev: yes
policykit: strict
mbim: no
qmi: yes
systemd suspend/resume: yes
systemd journal: yes
at command via dbus: no
Shared utils:
icera: yes
sierra: yes
option: yes
novatel: yes
xmm: yes
telit: yes
foxconn: yes
Plugins:
generic: yes
altair lte: yes
anydata: yes
broadmobi: yes
cinterion: yes
dell: yes
dlink: yes
fibocom: yes
foxconn: yes
haier: yes
huawei: yes
iridium: yes
linktop: yes
longcheer: yes
mbm: yes
motorola: yes
mtk: yes
nokia: yes
nokia icera: yes
novatel: yes
novatel lte: yes
option: yes
option hso: yes
pantech: yes
quectel: yes
samsung: yes
sierra legacy: yes
sierra: yes
simtech: yes
telit: yes
thuraya: yes
tplink: yes
ublox: yes
via: yes
wavecom: yes
x22x: yes
zte: yes
Miscellaneous:
gobject introspection: yes
vala bindings: yes
documentation: no
code coverage: no
| mm-iface-modem-location.c: In function 'location_gps_update_nmea':
| mm-iface-modem-location.c:272:61: error: comparison of integer expressions of different signedness: 'time_t' {aka 'long int'} and 'guint' {aka 'unsigned int'} [-Werror=sign-compare]
| time (NULL) - ctx->location_gps_nmea_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) {
| ^~
| mm-iface-modem-location.c:282:60: error: comparison of integer expressions of different signedness: 'time_t' {aka 'long int'} and 'guint' {aka 'unsigned int'} [-Werror=sign-compare]
| time (NULL) - ctx->location_gps_raw_last_time >= mm_gdbus_modem_location_get_gps_refresh_rate (skeleton))) {
| ^~
| mm-iface-modem-messaging.c: In function 'load_supported_storages_ready':
| mm-iface-modem-messaging.c:1154:53: error: cast increases required alignment of target type [-Werror=cast-align]
| mem1 = mm_common_build_sms_storages_string ((MMSmsStorage *)storage_ctx->supported_mem1->data,
| ^
| mm-iface-modem-messaging.c:1156:53: error: cast increases required alignment of target type [-Werror=cast-align]
| mem2 = mm_common_build_sms_storages_string ((MMSmsStorage *)storage_ctx->supported_mem2->data,
| ^
| mm-iface-modem-messaging.c:1158:53: error: cast increases required alignment of target type [-Werror=cast-align]
| mem3 = mm_common_build_sms_storages_string ((MMSmsStorage *)storage_ctx->supported_mem3->data,