Arduino-Websocket icon indicating copy to clipboard operation
Arduino-Websocket copied to clipboard

bugfix: made uint8_t const

Open TylerBre opened this issue 11 years ago • 3 comments

sha1.cpp:11:25: error: variable 'sha1InitState' must be const in order to be put into read-only section by means of 'attribute((progmem))' uint8_t sha1InitState[] PROGMEM = { ^

TylerBre avatar Aug 17 '14 03:08 TylerBre

This fix applies to arduino 1.5.7

TylerBre avatar Aug 17 '14 03:08 TylerBre

New error after that change?? What do Chuck mean with that there are changes to sha1.diff?? I don't understand a thing in that file??

This is the new error:

In file included from /Users/olle/Documents/Arduino/libraries/sha1/sha256.cpp:3:0: /Users/olle/Documents/Arduino/libraries/sha1/sha256.cpp:8:21: error: variable 'sha256K' must be const in order to be put into read-only section by means of 'attribute((progmem))' uint32_t sha256K[] PROGMEM = { ^ /Users/olle/Documents/Arduino/libraries/sha1/sha256.cpp:21:28: error: variable 'sha256InitState' must be const in order to be put into read-only section by means of 'attribute((progmem))' uint8_t sha256InitState[] PROGMEM = {

ollemagnusson avatar Feb 11 '15 17:02 ollemagnusson

@ollemagnusson that's the same type of error that @TylerBre fixes in his pull request. It looks like you're using a copy of the sha1 library outside of Arduino-Websocket. If you want to fix that error simple add const as the message details.

jesse-c avatar Jun 06 '15 08:06 jesse-c