]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: fix build warnings
authorDarrick J. Wong <djwong@kernel.org>
Tue, 2 Dec 2025 01:27:29 +0000 (17:27 -0800)
committerAndrey Albershteyn <aalbersh@kernel.org>
Wed, 3 Dec 2025 10:51:37 +0000 (11:51 +0100)
gcc 14.2 with all the warnings turn on complains about missing
prototypes for these two functions:

 util.c:147:1: error: no previous prototype for 'current_fixed_time' [-Werror=missing-prototypes]
   147 | current_fixed_time(
       | ^~~~~~~~~~~~~~~~~~
 util.c:590:1: error: no previous prototype for 'get_deterministic_seed' [-Werror=missing-prototypes]
   590 | get_deterministic_seed(
       | ^~~~~~~~~~~~~~~~~~~~~~

Since they're not used outside of util.c, just make them static.

Fixes: 4a54700b4385bb ("libxfs: support reproducible filesystems using deterministic time/seed")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
libxfs/util.c

index f6af4531ab4663e9201a9d3b532dc6d57c7b900e..334e88cd3fcb55fb0d94910ec2c16cf1a40bbc81 100644 (file)
@@ -143,7 +143,7 @@ xfs_log_calc_unit_res(
  *
  * Returns true on success, fail otherwise.
  */
-bool
+static bool
 current_fixed_time(
        struct                  timespec64 *tv)
 {
@@ -586,7 +586,7 @@ void xfs_inode_mark_sick(struct xfs_inode *ip, unsigned int mask) { }
  *
  * Returns true on success, fail otherwise.
  */
-bool
+static bool
 get_deterministic_seed(
        uint32_t        *result)
 {