13

I have recently ported my code to solidity 0.4.11 and have been noticing some warning errors upon declaring 'string' variables while declaring structs.

struct person {
    string name;
    string physicalAddress;
}

the warning I have been getting is: Variable is declared as a storage pointer. Use an explicit "storage" keyword to silence the warning. Suggestions on how to get rid of this warning? Also I am trying to understand the usage of storage and memory keywords - could anyone help explain the utility patterns of these keywords?

1
  • 1
    at least you sould not use address as a variable name
    – Badr Bellaj
    Commented Jul 15, 2017 at 8:28

1 Answer 1

6

This issue has been reported before in github and it was fixed in the patch below https://github.com/ethereum/solidity/pull/2551. Therefore, the solution is to upgrade your compiler.
NB : the compiler 0.4.14 is out since (2017-07-31)

.

5
  • thanks for the response! do you suggest updating the compiler version to 0.4.13 or 0.4.14 instead?
    – skarred14
    Commented Jul 15, 2017 at 20:03
  • 1
    0.4.14 is still unavailable github.com/ethereum/solidity/blob/develop/Changelog.md 0.4.13 didn't solve the problem
    – Badr Bellaj
    Commented Jul 15, 2017 at 20:13
  • @MagoNicolasPalacios what version do you use?
    – Badr Bellaj
    Commented Sep 20, 2017 at 19:51
  • @BadrBellaj Im using Mist 0.9. Commented Sep 21, 2017 at 13:22
  • Was it really fixed? I see this on their GitHub site:
    – Jazzmine
    Commented Oct 13, 2017 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.