]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
df: pacify -Wsuggest-attribute=malloc
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Aug 2021 19:42:20 +0000 (12:42 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 22 Aug 2021 20:10:26 +0000 (13:10 -0700)
Problem found with latest Gnulib and GCC 11.2.1.
* src/find-mount-point.h (find_mount_point):
Add _GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.

src/find-mount-point.h

index 028b2500c5fd8a1e6d6a16f8bd3e5398f0c29c53..a1bbcdc92dbec80d95d77b6357caa018a1cfa741 100644 (file)
@@ -14,4 +14,7 @@
    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
 
-extern char *find_mount_point (char const *, struct stat const *);
+#include <stdlib.h>
+
+extern char *find_mount_point (char const *, struct stat const *)
+  _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE;