[MPlayer-cvslog] r38471 - trunk/help/help_check.sh

ib subversion at mplayerhq.hu
Sun Apr 21 13:09:31 EEST 2024


Author: ib
Date: Sun Apr 21 13:09:31 2024
New Revision: 38471

Log:
Fix "error: ignoring return value" caused by -Werror=unused-result.

The strdup() function is only used to check if there is a compilation
error with the string constant. Any other string function, such as
strlen(), will do.

Modified:
   trunk/help/help_check.sh

Modified: trunk/help/help_check.sh
==============================================================================
--- trunk/help/help_check.sh	Sun Apr 21 13:07:02 2024	(r38470)
+++ trunk/help/help_check.sh	Sun Apr 21 13:09:31 2024	(r38471)
@@ -43,7 +43,7 @@ for h in "$@"; do
 #endif
 #include "$h"
 void $CHECK () {
-strdup(help_text);
+(void) strlen(help_text);
 EOF
 
   while read line; do
@@ -52,7 +52,7 @@ EOF
 
     if [ "$DEFINE" ]; then
       eval "$DEFINE'"
-      echo "strdup($NAME);" >> ${CHECK}.c
+      echo "(void) strlen($NAME);" >> ${CHECK}.c
       ANY_CONVSPEC="$(eval "echo \$${NAME} \${STRING}")"
     else
       ANY_CONVSPEC=""


More information about the MPlayer-cvslog mailing list