Arachnid / solidity-stringutils

Basic string utilities for Solidity
Apache License 2.0
1.13k stars 372 forks source link

Warnings when compiling #23

Open ohadnav opened 6 years ago

ohadnav commented 6 years ago
Compilation warnings encountered:

StringUtil.sol:250:5: Warning: This declaration shadows an existing declaration.
    uint len;
    ^------^
StringUtil.sol:157:3: The shadowed declaration is here:
  function len(slice self) internal returns (uint l) {
  ^
Spanning multiple lines.

StringUtil.sol:250:5: Warning: This declaration shadows an existing declaration.
    uint len;
    ^------^
StringUtil.sol:157:3: The shadowed declaration is here:
  function len(slice self) internal returns (uint l) {
  ^

Solidity: 0.4.18 Compiler: Truffle 4.0.7

ohadnav commented 6 years ago

Also..

StringUtil.sol:474:11: Warning: Jump instructions are low-level EVM features that can lead to incorrect stack access. Because of that they are discouraged. Please consider using "switch" or "for" statements instead.
          jumpi(exit, eq(and(mload(ptr), mask), needledata))
          ^---^
axic commented 6 years ago

The len problem was fixed by #17. The rest by #25.

PatrickAlphaC commented 2 years ago

Any movement on these?