build error - gcc 8.2.1

29 views
Skip to first unread message

Vinay

unread,
Dec 16, 2018, 7:47:40 PM12/16/18
to Wren
Hello folks,

I was just checking out this language (it looks cool, great work!).

Just for the info: build on fresh checkout on my manjaro linux (gcc version 8.2.1) gives the following error.
--
src/vm/wren_compiler.c: In function ‘error’:
src/vm/wren_compiler.c:402:36: error: ‘: ’ directive writing 2 bytes into a region of size between 1 and 159 [-Werror=format-overflow=]
   int length = sprintf(message, "%s: ", label);
                                    ^~
src/vm/wren_compiler.c:402:16: note: ‘sprintf’ output between 3 and 161 bytes into a destination of size 159
   int length = sprintf(message, "%s: ", label);
--
I moved the sprintf to snprintf (+added size) and things seems to work.

Kind Regards
.
Reply all
Reply to author
Forward
0 new messages