Skip to contentSkip to conversation

doc: develop: commands: Fix function prototype

PATCH New Alexander Dahl 1 participant 1 message Feb 26, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 doc: develop: commands: Fix function prototype

When using the previous prototype you got a compiler warning like this:

warning: initialization of 'int (*)(struct cmd_tbl *, int, int, char * const*)' from incompatible pointer type 'int (*)(struct cmd_tbl *, int, int, const char **)' [-Wincompatible-pointer-types]

Fixes 3d9640f55cb2 ("doc: expand README.commands")
---
 doc/develop/commands.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
doc/develop/commands.rst +1 -1
index ede880d248c..5ad4e59c838 100644
@@ -88,7 +88,7 @@ The command function pointer has to be of type
 
 .. code-block:: c
 
-    int (*cmd)(struct cmd_tbl *cmdtp, int flag, int argc, const char *argv[]);
+    int (*cmd)(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]);
 
 cmdtp
     Table entry describing the command (see above).

base-commit: 1a66a7768af7e8106c2cd93a19f4013877fb85ae

Signature · 1 line
2.39.2