From: Theodore Ts'o Date: Mon, 24 Feb 2025 05:00:42 +0000 (-0500) Subject: misc: fix missing variable names in function prototype X-Git-Tag: v1.47.3-rc1~121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bccbf730b1056a18721afb4a30a891090246c05c;p=thirdparty%2Fe2fsprogs.git misc: fix missing variable names in function prototype If libarchive support is not available or has been disable, the function __populate_fs_from_tar() just prints an error message, and doesn't use any of the function paramaters. Newer versions of gcc won't complain about the missing function names, since newer C standards allow this, but it breaks on older versions of gcc. Also return the error code ENOTSUP instead of 1. https://github.com/tytso/e2fsprogs/issues/213 Signed-off-by: Theodore Ts'o --- diff --git a/misc/create_inode_libarchive.c b/misc/create_inode_libarchive.c index bc358947..f2d4ba00 100644 --- a/misc/create_inode_libarchive.c +++ b/misc/create_inode_libarchive.c @@ -22,14 +22,17 @@ /* If ./configure was run with --without-libarchive, then only * __populate_fs_from_tar() remains in this file and will return an error. */ -errcode_t __populate_fs_from_tar(ext2_filsys, ext2_ino_t, const char *, - ext2_ino_t, struct hdlinks_s *, - struct file_info *, - struct fs_ops_callbacks *) { +errcode_t __populate_fs_from_tar(ext2_filsys fs EXT2FS_ATTR((unused)), + ext2_ino_t root_ino EXT2FS_ATTR((unused)), + const char *source_tar EXT2FS_ATTR((unused)), + ext2_ino_t root EXT2FS_ATTR((unused)), + struct hdlinks_s *hdlinks EXT2FS_ATTR((unused)), + struct file_info *target EXT2FS_ATTR((unused)), + struct fs_ops_callbacks *fs_callbacks EXT2FS_ATTR((unused))) { com_err(__func__, 0, _("you need to compile e2fsprogs without --without-libarchive" "be able to process tarballs")); - return 1; + return ENOTSUP; } #else