]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
mon/FSCommands: avoid unreachable code triggering compiler warning
authorPatrick Donnelly <pdonnell@ibm.com>
Sat, 31 May 2025 01:44:32 +0000 (21:44 -0400)
committerJos Collin <jcollin@redhat.com>
Tue, 23 Sep 2025 14:20:42 +0000 (19:50 +0530)
commitc60be40220740debba20c899004859cba7be6918
tree17688ec8a4f220dec64d943bc1b044aebfb3ae58
parent08451990b291b3bd76f5975d29869f3e602ff886
mon/FSCommands: avoid unreachable code triggering compiler warning

    In file included from /home/pdonnell/ceph/src/mds/FSMap.h:31,
                     from /home/pdonnell/ceph/src/mon/PaxosFSMap.h:20,
                     from /home/pdonnell/ceph/src/mon/MDSMonitor.h:26,
                     from /home/pdonnell/ceph/src/mon/FSCommands.cc:17:
    /home/pdonnell/ceph/src/mds/MDSMap.h: In member function ‘int FileSystemCommandHandler::set_val(Monitor*, FSMap&, MonOpRequestRef, const cmdmap_t&, std::ostream&, FileSystemCommandHandler::fs_or_fscid, std::string, std::string)’:
    /home/pdonnell/ceph/src/mds/MDSMap.h:223:40: warning: ‘fsp’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      223 |   bool test_flag(int f) const { return flags & f; }
          |                                        ^~~~~
    /home/pdonnell/ceph/src/mon/FSCommands.cc:417:21: note: ‘fsp’ was declared here
      417 |   const Filesystem* fsp;
          |                     ^~~

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 24acaaf766336466021caadba1facd2901775435)
src/mon/FSCommands.cc