From ac351293cb8ec4d427090ba340095ebfa507c01b Mon Sep 17 00:00:00 2001 From: Denis Kolegov Date: Mon, 18 Dec 2023 21:17:32 +0100 Subject: [PATCH] Fix Slither fps --- src/gateway/GatewayManagerFacet.sol | 1 + src/gateway/GatewayMessengerFacet.sol | 2 +- src/gateway/GatewayRouterFacet.sol | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gateway/GatewayManagerFacet.sol b/src/gateway/GatewayManagerFacet.sol index bb0ecf5d6..a7031d25f 100644 --- a/src/gateway/GatewayManagerFacet.sol +++ b/src/gateway/GatewayManagerFacet.sol @@ -151,6 +151,7 @@ contract GatewayManagerFacet is GatewayActorModifiers, ReentrancyGuard { // prevent spamming if there's no value to fund. revert InvalidCrossMsgValue(); } + // slither-disable-next-line unused-return (bool registered, ) = LibGateway.getSubnet(subnetId); if (!registered) { revert NotRegisteredSubnet(); diff --git a/src/gateway/GatewayMessengerFacet.sol b/src/gateway/GatewayMessengerFacet.sol index 67d314691..81c9d7e5f 100644 --- a/src/gateway/GatewayMessengerFacet.sol +++ b/src/gateway/GatewayMessengerFacet.sol @@ -111,7 +111,7 @@ contract GatewayMessengerFacet is GatewayActorModifiers { // to propagate, the user won't be able to reclaim funds. That's one of the // reasons xnet messages are disabled by default. - bool reject; + bool reject = false; if (applyType == IPCMsgType.BottomUp) { // We're traversing up, so if we're the first hop, we reject if the subnet was ERC20. // If we're not the first hop, a child propagated this to us, they made a mistake and diff --git a/src/gateway/GatewayRouterFacet.sol b/src/gateway/GatewayRouterFacet.sol index 1ebda6ba7..b64c29ad8 100644 --- a/src/gateway/GatewayRouterFacet.sol +++ b/src/gateway/GatewayRouterFacet.sol @@ -197,6 +197,7 @@ contract GatewayRouterFacet is GatewayActorModifiers { } // Now, let's find out the directionality of this message and act accordingly. + // slither-disable-next-line uninitialized-local SupplySource memory supplySource; IPCMsgType applyType = crossMsg.message.applyType(s.networkName); if (applyType == IPCMsgType.BottomUp) {