zephyr/lib/os
ferar alashkar 595bcda87c lib: os: dec: add misra-c2012 compliance changes
1. change explicit type cast of essential character type, complying with
required [misra-c2012-10.2] rule which states; Expressions of
essentially character type shall not be used inappropriately in addition
and subtraction operations, and

2. add explicit boolean type to 'if' statement controlling expression,
consolidating it with 'buflen' type, thus improving code readability and
maintainability , complying with required [misra-c2012-14.4] rule which
states; ; The controlling expression of an if statement and the
controlling expression of an iteration-statement shall have essentially
boolean type, and

3. add enclosing parentheses enforcing and clarifying precedence of
operators, improving code readability and maintainability, complying
with *advisory* [misra-c2012-12.1] rule which states; The precedence of
operators within expressions should be made explicit.

Found as a coding guideline violation (Rules 10.2, 14.4), and coding
guideline recommendation (Rule 12.1) by static code scanning tool.

Note: Tested on STM32L5 Nucleo-144 board (stm32l552xx).

Signed-off-by: ferar alashkar <ferar.alashkar@gmail.com>
2023-07-28 11:15:44 +02:00
..
assert.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
base64.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
bitarray.c bitarray: Fix mismatch checking when matching regions 2023-05-25 16:31:23 -04:00
cbprintf.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
cbprintf_complete.c sys: util: migrate all files to DIV_ROUND_UP 2023-04-11 12:00:37 +02:00
cbprintf_nano.c lib: os: cbprintf_nano: Fix Coverity issue 316025 2023-06-02 15:07:34 -04:00
cbprintf_packaged.c os: cbprintf: Address -Wextra warnings 2023-02-20 09:50:12 +01:00
CMakeLists.txt lib: syscalls: use zephyr_syscall_header 2023-06-17 07:57:45 -04:00
crc7_sw.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
crc8_sw.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
crc16_sw.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
crc32_sw.c coding guidelines: comply with MISRA C:2012 Rule 7.2 2022-06-14 13:36:14 -04:00
crc32c_sw.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
crc_shell.c posix: getopt: move declarations to unistd.h 2022-12-04 14:51:52 +01:00
dec.c lib: os: dec: add misra-c2012 compliance changes 2023-07-28 11:15:44 +02:00
fdtable.c lib: os: add k_condvar for each fdtable entry 2023-06-02 18:45:46 -04:00
heap-validate.c lib/os: use generic mem stats structure for heap 2022-07-12 13:59:26 +00:00
heap.c ARC: qemu: disable test where we trigger ARC QEMU bug #54720 2023-02-17 08:50:37 +09:00
heap.h sys: heap: support maximum allocated bytes statistic 2022-04-13 13:27:28 -07:00
heap_listener.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
hex.c lib: os: hex: correct explicit cast type 2023-07-28 11:15:19 +02:00
json.c json: Skip unknown fields on parsing 2023-07-18 11:03:21 +00:00
Kconfig lib: hashmap: Move hash table files lib/hashmap 2023-03-02 12:03:07 -05:00
Kconfig.cbprintf cbprintf: correct a Kconfig option help text 2023-06-01 11:10:51 +02:00
Kconfig.heap lib/os: add statistics tracking to mem_blocks 2022-07-12 13:59:26 +00:00
mem_blocks.c includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
mpsc_pbuf.c lib: os: mpsc_pbuf: Fix concurrency issues 2022-12-29 10:33:29 +01:00
multi_heap.c lib: add mising braces to single line if statements 2022-07-06 11:00:45 -04:00
mutex.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
notify.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
onoff.c lib: os: Remove unneeded assignment 2022-06-23 15:43:59 -05:00
p4wq.c iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
printk.c lib/printk: Use picolibc's vfprintf instead of cbvprintf 2022-06-24 20:30:03 +02:00
rb.c lib: rb: Remove unneeded statement 2022-06-05 14:49:37 +02:00
reboot.c lib: os: reboot: include zephyr/cache.h 2023-01-24 14:35:49 +00:00
ring_buffer.c lib: ring_buf: Make code consistent 2022-06-06 22:46:43 +02:00
sem.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
shared_multi_heap.c shared_multi_heap: Use a data struct 2023-07-26 07:56:39 -04:00
spsc_pbuf.c spsc_pbuf: Fix cache wb in spsc_pbuf_free 2022-12-07 10:21:33 +00:00
thread_entry.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
timeutil.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
user_work.c lib: migrate includes to <zephyr/...> 2022-05-06 19:58:09 +02:00
utf8.c zephyr: Fix n=0 for utf8_lcpy 2022-07-04 15:49:22 +02:00
winstream.c lib/os: winstream: properly include string.h for memcpy 2022-06-21 14:02:13 -04:00