diff --git a/ciphers/uint128_t.hpp b/ciphers/uint128_t.hpp index 917d4a954..d50cb4ffb 100644 --- a/ciphers/uint128_t.hpp +++ b/ciphers/uint128_t.hpp @@ -462,7 +462,7 @@ class uint128_t { tmp <<= left; uint128_t quotient(0); uint128_t zero(0); - while (left >= 0 && tmp2 >= p) { + while (tmp2 >= p) { uint16_t shf = tmp2._lez() - tmp._lez(); if (shf) { tmp >>= shf; diff --git a/ciphers/uint256_t.hpp b/ciphers/uint256_t.hpp index ad300ed37..a776d4cb0 100644 --- a/ciphers/uint256_t.hpp +++ b/ciphers/uint256_t.hpp @@ -429,7 +429,7 @@ class uint256_t { tmp <<= left; uint256_t quotient(0); uint256_t zero(0); - while (left >= 0 && tmp2 >= p) { + while (tmp2 >= p) { uint16_t shf = tmp2._lez() - tmp._lez(); if (shf) { tmp >>= shf; diff --git a/data_structures/reverse_a_linked_list.cpp b/data_structures/reverse_a_linked_list.cpp index e7ce44ee0..7317467c5 100644 --- a/data_structures/reverse_a_linked_list.cpp +++ b/data_structures/reverse_a_linked_list.cpp @@ -128,6 +128,7 @@ int32_t list::top() { } catch (const std::exception &e) { std::cerr << "List is empty" << e.what() << '\n'; } + return 0; } /** * @brief Utility function to find the last element of the list @@ -145,6 +146,7 @@ int32_t list::last() { } catch (const std::exception &e) { std::cerr << "List is empty" << e.what() << '\n'; } + return 0; } /** * @brief Utility function to find the i th element of the list @@ -165,6 +167,7 @@ int32_t list::traverse(int index) { /* if we get to this line,the caller was asking for a non-existent element so we assert fail */ assert(0); + return 0; } } // namespace linked_list