zephyr/subsys/shell
Nicolas Pitre 6311766d9a pointer-type args: cast appropriately to be 64-bit compatible
Using void pointers as universal arguments is widely used. However, when
compiling a 64-bit target, the compiler doesn't like when an int is
converted to a pointer and vice versa despite the presence of a cast.
This is due to a width mismatch between ints (32 bits) and pointers
(64 bits). The trick is to cast to a widening integer type such as
intptr_t and then cast to
void*.

When appropriate, the INT_TO_POINTER macro is used instead of this
double cast to make things clearer. The converse with POINTER_TO_INT
is also done which also serves as good code annotations.

While at it, remove unneeded casts to specific pointer types from void*
in the vicinity, and move to typed variable upon function entry to make
the code cleaner.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2019-06-12 08:20:52 -07:00
..
modules license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
CMakeLists.txt license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig shell: Refactor shell_history to use less RW memory 2019-05-30 09:44:03 -04:00
Kconfig.backends shell: prompt configuration during project generation 2019-04-30 10:40:04 -04:00
Kconfig.template.shell_log_queue_size license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
Kconfig.template.shell_log_queue_timeout license: cleanup: add SPDX Apache-2.0 license identifier 2019-04-07 08:45:22 -04:00
shell_cmds.c shell: add select command 2019-05-24 11:04:42 +02:00
shell_dummy.c shell: prompt configuration during project generation 2019-04-30 10:40:04 -04:00
shell_fprintf.c subsystems: Rename reserved function names 2019-04-03 17:31:00 -04:00
shell_help.c shell: add select command 2019-05-24 11:04:42 +02:00
shell_help.h shell: creating new module for help functionality 2018-12-05 15:15:44 +01:00
shell_history.c shell: Refactor shell_history to use less RW memory 2019-05-30 09:44:03 -04:00
shell_log_backend.c shell: Add handling of CONFIG_LOG_INPLACE_PROCESS option 2019-02-05 09:55:39 +01:00
shell_ops.c shell: Initialize va_list variables portably. 2019-06-07 12:08:35 +02:00
shell_ops.h shell: allow commands to suspend shell thread 2019-02-14 13:40:28 +01:00
shell_rtt.c shell: prompt configuration during project generation 2019-04-30 10:40:04 -04:00
shell_telnet_protocol.h shell: Add TELNET backend 2019-04-01 10:26:13 -04:00
shell_telnet.c shell: prompt configuration during project generation 2019-04-30 10:40:04 -04:00
shell_uart.c shell: Fix shell uart not waking up shell on mcumgr data 2019-06-04 14:00:17 +02:00
shell_utils.c style: add braces around if/while statements 2019-06-06 15:20:21 +02:00
shell_utils.h shell: add select command 2019-05-24 11:04:42 +02:00
shell_vt100.h shell: add select command 2019-05-24 11:04:42 +02:00
shell_wildcard.c shell: allow commands to suspend shell thread 2019-02-14 13:40:28 +01:00
shell_wildcard.h shell: Add wildcard support 2018-09-19 09:30:29 -04:00
shell.c pointer-type args: cast appropriately to be 64-bit compatible 2019-06-12 08:20:52 -07:00