Put 'pkg_config_path' before 'variant' so the environment variables are
ordered alphabetically. No functional changes.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Arch Linux builds can fail if system is not upgraded while installing
new packages, probably due to mismatched libraries:
clang: /usr/lib/libc.so.6: version `GLIBC_2.38' not found (required by /usr/lib/libstdc++.so.6)
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Without big development activity, thus workflows triggered on changes,
CI builds might never run. In the same time distros actually change, so
things can get be broken due to external (distro) reasons. This is
especially true for development versions, like Debian testing.
Run at least once per week, to be sure everything still builds even
without development activity.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Newer ARMv7 boards are actually supported by armhf, not armel. armel
containers might not even work:
The following packages have unmet dependencies:
libc6-dev:armel : Depends: linux-libc-dev:armel but it is not installable
E: Unable to correct problems, you have held broken packages.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
[DB: fixed pkg-config-path]
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
After fixing all the warnings (at least on gcc v11.3.0), enable them as
errors, so any silent builds will explicitly fail (also in Continuous
Integration builds).
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes clang warning:
circ_buf.c:49:9: warning: variable 'count' set but not used [-Wunused-but-set-variable]
size_t count = 0;
^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Pointer arithmetic should not be done on void pointers.
cdba-server.c:146:21: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
146 | memcpy(newp + fastboot_size, data, len);
| ^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Code should avoid comparing signed and unsigned integers, because of
implicit case. Explicit casts are safe because 'lock' size is PATH_MAX.
device.c: In function ‘device_lock’:
device.c:64:15: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
64 | if (n >= sizeof(lock))
| ^~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes:
device_parser.c: In function ‘nextsym’:
device_parser.c:53:56: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
53 | fprintf(stderr, "device parser: error %d\n", dp->parser.error);
| ~^ ~~~~~~~~~~~~~~~~
| | |
| int unsigned int
| %d
device_parser.c: In function ‘expect’:
device_parser.c:80:58: warning: format ‘%d’ expects argument of type ‘int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
80 | fprintf(stderr, "device parser: expected %d got %d\n", type, dp->event.type);
| ~^ ~~~~~~~~~~~~~~
| | |
| int unsigned int
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Code should avoid comparing signed and unsigned integers, because of
implicit case. Explicit casts are safe because 'buf' size is 256.
conmux.c: In function ‘registry_lookup’:
conmux.c:169:17: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
169 | if (ret >= sizeof(buf))
| ^~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes:
cdb_assist.c: In function ‘cdb_assist_print_status’:
cdb_assist.c:351:28: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
351 | n = sprintf(buf, "%dmV %dmA%s%s%s%s%s ref: %dmV",
| ~^
| |
| int
| %d
352 | cdb->voltage_set,
| ~~~~~~~~~~~~~~~~
| |
| unsigned int
cdb_assist.c:372:29: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
372 | n = sprintf(buf, "u%d\r\n", mV);
| ~^ ~~
| | |
| int unsigned int
| %d
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Pointer arithmetic should not be done on void pointers.
circ_buf.c: In function ‘circ_read’:
circ_buf.c:104:25: warning: pointer of type ‘void *’ used in subtraction [-Wpointer-arith]
104 | return (void*)p - buf;
| ^
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Code should avoid comparing signed and unsigned integers, because of
implicit case.
circ_buf.c: In function ‘circ_fill’:
circ_buf.c:69:20: warning: comparison of integer expressions of different signedness: ‘ssize_t’ {aka ‘long int’} and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
69 | } while (n != space);
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Pointer arithmetic should not be done on void pointers.
cdba.c: In function ‘fastboot_work_fn’:
cdba.c:377:38: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
377 | memcpy(msg->data, work->data + work->offset, left);
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Pointer arithmetic should not be done on void pointers.
fastboot.c:223:37: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
223 | ptr += USB_DT_SS_EP_COMP_SIZE;
| ^~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes:
ftdi-gpio.c: In function ‘ftdi_gpio_parse_config’:
ftdi-gpio.c:146:58: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘unsigned int’ [-Wformat=]
146 | errx(1, "GPIOs offset invalid: '%d'", gpio_offset);
| ~^ ~~~~~~~~~~~
| | |
| int unsigned int
| %d
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Fixes:
ftdi-gpio.c: In function ‘ftdi_gpio_open’:
ftdi-gpio.c:190:9: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Correct parsing of 'B' interface name from config and also fix:
ftdi-gpio.c: In function ‘ftdi_gpio_parse_config’:
ftdi-gpio.c:104:31: warning: logical ‘and’ of equal expressions [-Wlogical-op]
104 | if (*interface != 'A' &&
| ^~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Add Continuous Integration using Github actions, re-using similar setup
from linux-nfc/neard [1] (dropped Alpine, Ubuntu i386, sanitizers and
few others action steps). Since I copied most files, I retained all
original copyrights.
The CI will build cdba for several different distros and architectures.
[1] https://github.com/linux-nfc/neard
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>