From 84e8927b1bb48c1760bff9eff7acffc4bda08b85 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 May 2024 12:32:36 +0200 Subject: [PATCH] lib/nfs/FileReader: remove obsolete stat64 cast Obsoleted (and broken) by commit 9947d3e67fb4f7ab388c4ae1593dad8bce0f3153 --- src/lib/nfs/FileReader.cxx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/lib/nfs/FileReader.cxx b/src/lib/nfs/FileReader.cxx index 0538f7f73..466491630 100644 --- a/src/lib/nfs/FileReader.cxx +++ b/src/lib/nfs/FileReader.cxx @@ -183,20 +183,11 @@ NfsFileReader::OpenCallback(nfsfh *_fh) noexcept } inline void -NfsFileReader::StatCallback(const struct nfs_stat_64 *_st) noexcept +NfsFileReader::StatCallback(const struct nfs_stat_64 *st) noexcept { assert(connection != nullptr); assert(fh != nullptr); - assert(_st != nullptr); - -#if defined(_WIN32) && !defined(_WIN64) - /* on 32-bit Windows, libnfs enables -D_FILE_OFFSET_BITS=64, - but MPD (Meson) doesn't - to work around this mismatch, we - cast explicitly to "struct stat64" */ - const auto *st = (const struct stat64 *)_st; -#else - const auto *st = _st; -#endif + assert(st != nullptr); if (!S_ISREG(st->nfs_mode)) { OnNfsFileError(std::make_exception_ptr(std::runtime_error("Not a regular file")));