This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git

commit b535ba811008bf5f058fd457aa5e0bb72f286beb
Author: Marco Casaroli <[email protected]>
AuthorDate: Fri Oct 30 11:59:56 2026 +0100

    testing/ostest: Pass a non-const string to putenv().
    
    POSIX declares putenv() with a "char *" parameter: the string itself
    becomes part of the environment.  ostest passed a const array, which
    gives a warning when <stdlib.h> uses the POSIX prototype.  Make the
    array non-const; ostest does not change it.  The array is static, so
    it stays valid while it is in the environment.
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 testing/ostest/ostest_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/testing/ostest/ostest_main.c b/testing/ostest/ostest_main.c
index 1ae017eef..a0b42a67f 100644
--- a/testing/ostest/ostest_main.c
+++ b/testing/ostest/ostest_main.c
@@ -96,7 +96,7 @@ static const char g_var3_value[]   = "GoodValue3";
 static const char g_bad_value1[]   = "BadValue1";
 static const char g_bad_value2[]   = "BadValue2";
 
-static const char g_putenv_value[] = "Variable1=BadValue3";
+static char g_putenv_value[] = "Variable1=BadValue3";
 #endif
 
 /****************************************************************************

Reply via email to