From: Alexander Dahl <ada@thorsis.com>
Date: Mon, 26 Feb 2024 15:46:43 +0000 (+0100)
Subject: doc: develop: commands: Fix function prototype
X-Git-Tag: v2025.01-rc5-pxa1908~620^2~3
X-Git-Url: http://git.dujemihanovic.xyz/img/html/index.html?a=commitdiff_plain;h=27987b86a0a45849c1f6110252ec15b413caf34c;p=u-boot.git

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")
Signed-off-by: Alexander Dahl <ada@thorsis.com>
---

diff --git a/doc/develop/commands.rst b/doc/develop/commands.rst
index ede880d248..5ad4e59c83 100644
--- a/doc/develop/commands.rst
+++ b/doc/develop/commands.rst
@@ -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).