sapling/eden/fs/inodes
Richard Barnes c11c27020d Fix shadowed variable in eden/fs/inodes/EdenMount.cpp
Summary:
Our upcoming compiler upgrade will require us not to have shadowed variables. Such variables have a _high_ bug rate and reduce readability, so we would like to avoid them even if the compiler was not forcing us to do so.

This codemod attempts to fix an instance of a shadowed variable. Please review with care: if it's failed the result will be a silent bug.

**What's a shadowed variable?**

Shadowed variables are variables in an inner scope with the same name as another variable in an outer scope. Having the same name for both variables might be semantically correct, but it can make the code confusing to read! It can also hide subtle bugs.

This diff fixes such an issue by renaming the variable.

 - If you approve of this diff, please use the "Accept & Ship" button :-)

Reviewed By: palmje

Differential Revision: D53478938

fbshipit-source-id: 686af60cacd2c6d356f2ad6464b51712b59ed96f
2024-02-06 16:38:53 -08:00
..
fscatalog Re-sync with internal repository 2023-10-11 22:09:00 -07:00
lmdbcatalog split LMDBFileContentStore from LMDBInodeCatalog 2023-11-29 10:49:40 -08:00
memcatalog Re-sync with internal repository 2023-10-11 22:09:00 -07:00
overlay Disable Cargo documentation generation for Thrift targets 2024-02-02 07:45:58 -08:00
sqlitecatalog Factor PrjFS on-disk state functions out of WindowsFsck 2023-10-27 14:53:17 -07:00
test Remove explicit key 2023-12-04 10:03:02 -08:00
CacheHint.h standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
CheckoutAction.cpp inodes: return ImmediateFuture from loadChildLocked 2023-11-07 11:18:21 -08:00
CheckoutAction.h inodes: return ImmediateFuture from loadChildLocked 2023-11-07 11:18:21 -08:00
CheckoutContext.cpp inodes: remove QueuedImmediateExecutor from checkout 2023-10-24 12:03:55 -07:00
CheckoutContext.h inodes: remove QueuedImmediateExecutor from checkout 2023-10-24 12:03:55 -07:00
CMakeLists.txt LMDBInodeCatalog + LMDBFileContentStore 2023-11-13 12:47:14 -08:00
DeferredDiffEntry.cpp store: remove handling of gitignore in diff 2023-09-05 15:18:39 -07:00
DeferredDiffEntry.h store: remove handling of gitignore in diff 2023-09-05 15:18:39 -07:00
DirEntry.cpp Rewrite removeRecursively to fast remove unloaded children if possible (try #3) 2022-06-16 16:06:54 -07:00
DirEntry.h avoid a copy in DirEntry::getHash 2022-08-31 14:57:46 -07:00
EdenDispatcherFactory.cpp allow mounting nfs mount 2023-04-06 13:00:32 -07:00
EdenDispatcherFactory.h allow mounting nfs mount 2023-04-06 13:00:32 -07:00
EdenMount.cpp Fix shadowed variable in eden/fs/inodes/EdenMount.cpp 2024-02-06 16:38:53 -08:00
EdenMount.h migrate fields of type folly::SharedMutex to be marked as mutable in fbcode (assorted) 2024-01-23 22:38:19 -08:00
EdenMountError.h standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
EdenMountHandle.cpp move EdenMountHandle into its own sources 2023-05-18 09:44:50 -07:00
EdenMountHandle.h move EdenMountHandle into its own sources 2023-05-18 09:44:50 -07:00
FileContentStore.h rename IFileContentStore -> FileContentStore 2023-10-10 11:03:56 -07:00
FileInode.cpp Remove extra semi colon from eden/fs/inodes/FileInode.cpp 2023-12-08 17:29:10 -08:00
FileInode.h inode: revamp blob loading 2023-11-28 12:57:11 -08:00
FsChannel.h move unmount into FsChannel 2023-07-21 16:31:39 -07:00
FuseDispatcherImpl.cpp DirList -> {Fuse,Nfs}DirList 2023-04-05 16:35:43 -07:00
FuseDispatcherImpl.h decouple ObjectFetchContext lifetime from RequestContext 2022-11-15 13:35:45 -08:00
GlobNode.cpp fully separate GlobNode and GlobTree 2023-10-10 14:54:13 -07:00
GlobNode.h fully separate GlobNode and GlobTree 2023-10-10 14:54:13 -07:00
InodeBase.cpp rewrite readdir prefetching logic 2023-01-04 19:17:36 -08:00
InodeBase.h Remove outdated comment about rename lock being missing 2023-07-19 21:28:13 -07:00
InodeCatalog.h symlinks: make EdenFS get proper symlink type on restart 2023-08-14 18:34:17 -07:00
InodeError.cpp clang-tidy advice 2023-07-13 16:30:55 -07:00
InodeError.h remove folly::Format PathError 2022-08-02 11:44:19 -07:00
InodeMap.cpp Remove header dependency in InodeMap.h 2023-09-22 15:14:27 -07:00
InodeMap.h Remove header dependency in InodeMap.h 2023-09-22 15:14:27 -07:00
InodeMetadata.cpp standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
InodeMetadata.h break the folly/Portability.h dependency on SysTypes.h 2023-08-10 15:29:38 -07:00
InodeNumber.cpp standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
InodeNumber.h fix the custom PathFuncs and ObjectId formatters 2022-10-04 21:42:44 -07:00
InodePtr-defs.h standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
InodePtr.cpp move function definitions for InodePtr takeOwnership to c++ file 2022-11-29 12:39:58 -08:00
InodePtr.h move function definitions for InodePtr takeOwnership to c++ file 2022-11-29 12:39:58 -08:00
InodePtrFwd.h standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
InodeTable.h Revert D51029740: Namespace doesn't need to be followed by semicolon 2023-11-06 08:37:37 -08:00
InodeTimestamps.cpp prjfs: set the timestamps when adding placeholders 2023-04-19 11:36:52 -07:00
InodeTimestamps.h prjfs: set the timestamps when adding placeholders 2023-04-19 11:36:52 -07:00
NfsDispatcherImpl.cpp Fix shadowed variable in eden/fs/inodes/NfsDispatcherImpl.cpp 2024-02-05 16:52:45 -08:00
NfsDispatcherImpl.h replace off_t file offsets with a new FileOffset type compatible with Windows 2023-07-14 16:23:19 -07:00
Overlay.cpp split LMDBFileContentStore from LMDBInodeCatalog 2023-11-29 10:49:40 -08:00
Overlay.h LMDBInodeCatalog + LMDBFileContentStore 2023-11-13 12:47:14 -08:00
OverlayFile.cpp split LMDBFileContentStore from LMDBInodeCatalog 2023-11-29 10:49:40 -08:00
OverlayFile.h extend OverlayFile to hold folly::File or InodeNumber 2023-10-10 11:03:56 -07:00
OverlayFileAccess.cpp LMDBInodeCatalog + LMDBFileContentStore 2023-11-13 12:47:14 -08:00
OverlayFileAccess.h replace off_t file offsets with a new FileOffset type compatible with Windows 2023-07-14 16:23:19 -07:00
ParentInodeInfo.h standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
PathError.cpp Add new PathError to mimic InodeError's behavior with a raw path 2022-04-12 16:50:22 -07:00
PathError.h introduce an asString() on Path and PathPiece 2022-11-11 18:46:15 -08:00
PrjfsDispatcherImpl.cpp symlinks: fix bug when resolving symlink paths on cycles 2023-11-09 09:56:38 -08:00
PrjfsDispatcherImpl.h symlinks: fix symlinks containing paths composed of other symlinks on Windows 2023-11-07 10:07:50 -08:00
RequestContext.cpp migrate ObjectFetchContext to ProcessId 2023-07-13 09:43:19 -07:00
RequestContext.h migrate ObjectFetchContext to ProcessId 2023-07-13 09:43:19 -07:00
ServerState.cpp nfs: move NFS thread pool to ServerState 2023-11-28 12:57:11 -08:00
ServerState.h nfs: move NFS thread pool to ServerState 2023-11-28 12:57:11 -08:00
TARGETS split LMDBFileContentStore from LMDBInodeCatalog 2023-11-29 10:49:40 -08:00
Traverse.cpp inodes: fix infinite loop in traverseTreeInodeChildren 2022-03-10 15:32:32 -08:00
Traverse.h fix some laziness in the include structure 2022-03-03 12:11:31 -08:00
TreeInode.cpp inodes: return ImmediateFuture from loadChildLocked 2023-11-07 11:18:21 -08:00
TreeInode.h inodes: return ImmediateFuture from loadChildLocked 2023-11-07 11:18:21 -08:00
TreePrefetchLease.cpp standardize namespaces on C++17 syntax 2022-05-17 10:12:56 -07:00
TreePrefetchLease.h migrate ObjectFetchContext to ProcessId 2023-07-13 09:43:19 -07:00
UnmaterializedBlobDirEntry.h remove some unnecessary includes from VirtualInode.h 2023-05-09 15:29:04 -07:00
UnmaterializedUnloadedBlobDirEntry.h minor VirtualInode refactoring 2023-05-11 11:10:01 -07:00
VirtualInode.cpp eden (-634582337351233872) 2023-09-08 16:01:45 -07:00
VirtualInode.h symlinks: add additional gating for TreeEntry::getType 2023-07-28 16:05:05 -07:00
VirtualInodeLoader.h inodes: remove background future from VirtualInodeLoader 2023-10-24 12:03:55 -07:00