numworks / epsilon

Modern graphing calculator operating system.
https://www.numworks.com/resources/engineering/software/
1.75k stars 463 forks source link

Compiler warnings #757

Closed gnah33 closed 5 years ago

gnah33 commented 6 years ago

I've got unusual warning messages when building epsilon.elf and maybe it's linked to a matrix issue I just discovered. Messages (some of them) : `I18N apps/i18n.cpp HOSTCC escher/image/inliner QSTRDAT python/port/genhdr/qstrdefs.generated.h CXX ion/src/device/usb/boot.o HOSTCC kandinsky/fonts/rasterizer FLEX poincare/src/expression_lexer.cpp poincare/src/expression_lexer.hpp escher/image/inliner.c: Dans la fonction « generateImplementationFromImage »: escher/image/inliner.c:178:5: attention : passing argument 1 of « LZ4_compress_HC » from incompatible pointer type [-Wincompatible-pointer-types] pixelBuffer,

In file included from escher/image/inliner.c:17:0: escher/image/../../ion/src/external/lz4/lz4hc.h:66:16: note : expected « const char  » but argument is of type « uint16_t {alias short unsigned int } » LZ4LIB_API int LZ4_compress_HC (const char src, char* dst, int srcSize, int dstCapacity, int compressionLevel);

BISON poincare/src/expression_parser.cpp poincare/src/expression_parser.hpp AS liba/src/armv7m/setjmp.o poincare/src/expression_parser.y:114.10-35: avertissement: la règle est inutile dans l'analyseur à cause de conflits [-Wother] | DIGITS DIGITS { YYERROR; } ^^^^^^^^^^^^^^^^^^^^^^^^^^ AS liba/src/armv7m/longjmp.o CC liba/src/assert.o` ... ion/src/external/lz4/lz4.c: In function 'LZ4_createStreamDecode': ion/src/external/lz4/lz4.c:166:27: warning: implicit declaration of function 'calloc'; did you mean 'malloc'? [-Wimplicit-function-declaration]

define ALLOC_AND_ZERO(s) calloc(1,s)

ion/src/external/lz4/lz4.c:1747:54: note: in expansion of macro 'ALLOC_AND_ZERO' LZ4_streamDecode_t lz4s = (LZ4_streamDecode_t) ALLOC_AND_ZERO(sizeof(LZ4_streamDecode_t)); ... And only when building the epsilon.elf for the device, I've got a bunch of messages like : ... python/src/py/lexer.h:189:13: warning: type of 'mp_lexer_new_from_file' does not match original declaration [-Wlto-type-mismatch] mp_lexer_t mp_lexer_new_from_file(const char filename);

python/port/port.cpp:151:14: note: 'mp_lexer_new_from_file' was previously declared here mp_lexer_t mp_lexer_new_from_file(const char filename) {

python/port/port.cpp:151:14: note: code may be misoptimized unless -fno-strict-aliasing is used ion/src/device/stack.cpp:4:21: warning: type of '_stack_end' does not match original declaration [-Wlto-type-mismatch] extern const void * _stack_end;

I'm using the latest arm toolchain(Version 7-2018-q2-update Linux 64-bit) and building the version-1.7.1 branch worked fine.

Now the matrix issue : Inverse of (16 -4 1) (1 1 1) (16 4 1) gives a22 = -1.11E-16 instead of zero. That does not occur with the 1.7.1 version nor with the last commits simulators but weirdly, only with the last commits device firmwares.

Ecco commented 5 years ago

We've gotten rid of Bison so this has been fixed 😄