Skip to content

Commit

Permalink
Fix warnings and other platform builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Feb 21, 2024
1 parent 0644c71 commit 6cfe475
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
5 changes: 5 additions & 0 deletions extra_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"-<system/freertos_plus_tcp/>",
"-<system/mbed/>",
"-<system/unix/>",
"-<system/flipper/>",
"-<system/windows/>"]
CPPDEFINES = ["ZENOH_ZEPHYR"]

Expand All @@ -43,6 +44,7 @@
"-<system/freertos_plus_tcp/>",
"-<system/mbed/>",
"-<system/unix/>",
"-<system/flipper/>",
"-<system/windows/>",
"-<system/zephyr/>"]
CPPDEFINES = ["ZENOH_ARDUINO_ESP32", "ZENOH_C_STANDARD=99"]
Expand All @@ -58,6 +60,7 @@
"-<system/freertos_plus_tcp/>",
"-<system/mbed/>",
"-<system/unix/>",
"-<system/flipper/>",
"-<system/windows/>",
"-<system/zephyr/>"]
CPPDEFINES = ["ZENOH_ARDUINO_OPENCR", "ZENOH_C_STANDARD=99", "Z_FEATURE_MULTI_THREAD=0"]
Expand All @@ -71,6 +74,7 @@
"-<system/freertos_plus_tcp/>",
"-<system/mbed/>",
"-<system/unix/>",
"-<system/flipper/>",
"-<system/windows/>",
"-<system/zephyr/>"]
CPPDEFINES = ["ZENOH_ESPIDF"]
Expand All @@ -84,6 +88,7 @@
"-<system/espidf/>",
"-<system/freertos_plus_tcp/>",
"-<system/unix/>",
"-<system/flipper/>",
"-<system/windows/>",
"-<system/zephyr/>"]
CPPDEFINES = ["ZENOH_MBED", "ZENOH_C_STANDARD=99"]
Expand Down
4 changes: 2 additions & 2 deletions src/collections/list.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// ZettaScale Zenoh Team, <[email protected]>
//

#include <stddef.h>

#include "zenoh-pico/collections/list.h"

#include <stddef.h>

/*-------- Inner single-linked list --------*/
_z_list_t *_z_list_of(void *x) {
_z_list_t *xs = (_z_list_t *)zp_malloc(sizeof(_z_list_t));
Expand Down
7 changes: 2 additions & 5 deletions src/system/flipper/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ static void _z_serial_received_byte_callback(FuriHalSerialHandle* handle, FuriHa
}

int8_t _z_open_serial_from_pins(_z_sys_net_socket_t* sock, uint32_t txpin, uint32_t rxpin, uint32_t baudrate) {

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 207 with no text in the supplied rule-texts-file Warning

misra violation 207 with no text in the supplied rule-texts-file
int8_t ret = _Z_ERR_GENERIC;

return ret;
return _Z_ERR_GENERIC;
}

int8_t _z_open_serial_from_dev(_z_sys_net_socket_t* sock, char* dev, uint32_t baudrate) {
Expand Down Expand Up @@ -177,10 +175,9 @@ size_t _z_read_serial(const _z_sys_net_socket_t sock, uint8_t* ptr, size_t len)

size_t _z_read_exact_serial(const _z_sys_net_socket_t sock, uint8_t* ptr, size_t len) {

Check warning

Code scanning / Cppcheck (reported by Codacy)

misra violation 804 with no text in the supplied rule-texts-file Warning

misra violation 804 with no text in the supplied rule-texts-file
size_t n = len;
size_t rb = 0;

do {
rb = _z_read_serial(sock, ptr, n);
size_t rb = _z_read_serial(sock, ptr, n);
if (rb == SIZE_MAX) {
return rb;
}
Expand Down

0 comments on commit 6cfe475

Please sign in to comment.