]> Savannah Git Hosting - gnulib.git/commitdiff
classpath, csharpexec: Avoid "candidate for attribute 'malloc'" warning.
authorBruno Haible <bruno@clisp.org>
Sat, 3 Jun 2023 11:07:31 +0000 (13:07 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 3 Jun 2023 11:11:37 +0000 (13:11 +0200)
* lib/classpath.h (set_classpath): Mark with attribute 'malloc'.

ChangeLog
lib/classpath.h

index fa13d3860b05e20755601b7b1f8e368870ccd1ad..5c1d3a1edf81816f79b1a0304fa4eb6a815badb2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2023-06-03  Bruno Haible  <bruno@clisp.org>
+
+       classpath, csharpexec: Avoid "candidate for attribute 'malloc'" warning.
+       * lib/classpath.h (set_classpath): Mark with attribute 'malloc'.
+
 2023-06-03  Bruno Haible  <bruno@clisp.org>
 
        propername-lite: Improve documentation.
index abcb4cbe4000e4deac3b25860b9cbba5fb96f835..65123140cfcc5054307f29e74cc597841109192c 100644 (file)
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
+/* This file uses _GL_ATTRIBUTE_MALLOC.  */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
 /* Return the new CLASSPATH value.  The given classpaths are prepended to
    the current CLASSPATH value.   If use_minimal_classpath, the current
    CLASSPATH is ignored.  */
@@ -25,7 +30,8 @@ extern char * new_classpath (const char * const *classpaths,
 /* Set CLASSPATH and returns a safe copy of its old value.  */
 extern char * set_classpath (const char * const *classpaths,
                              unsigned int classpaths_count,
-                             bool use_minimal_classpath, bool verbose);
+                             bool use_minimal_classpath, bool verbose)
+     _GL_ATTRIBUTE_MALLOC;
 
 /* Restore CLASSPATH to its previous value.  */
 extern void reset_classpath (char *old_classpath);