ccxvii / mujs

An embeddable Javascript interpreter in C.
http://mujs.com/
ISC License
794 stars 96 forks source link

Warnings #169

Open trufae opened 1 year ago

trufae commented 1 year ago

Copypasting some of the warnings i get that block my -Werror builds, maybe worth adding those cflags in the mujs ci

p/mujs/mujs/jsrun.c: In function ‘jsR_run’:
p/mujs/mujs/jsrun.c:201:14: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow]
  if (idx < 0 || idx >= TOP)
              ^
In file included from p/mujs/mujs/one.c:21:0,
                 from p/mujs/plugin.c:9,
                 from lang.c:24:
p/mujs/mujs/jsrun.c: In function ‘js_call’:
p/mujs/mujs/jsrun.c:383:5: error: assuming signed overflow does not occur when assuming that (X - c) > X is always false [-Werror=strict-overflow]
  if (TOP < BOT) {
     ^