Fix these 2 warnings:
litex/build/sim/core/libdylib.c:42:5: warning: 'strncpy' specified bound 2048 equals destination size
[-Wstringop-truncation]
strncpy(last_err, s, ERR_MAX_SIZE);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function 'set_last_error',
litex/soc/software/libbase/exception.c:28:13: warning: function declaration isn't a prototype [-Wstrict-prototypes]
static char emerg_getc()
if (!s)
s = "NULL error";
last_err_set = 1;
- strncpy(last_err, s, ERR_MAX_SIZE);
+ strncpy(last_err, s, ERR_MAX_SIZE-1);
}
static dylib_ref dylib_ref_alloc (void *handle, const char *path)
}
}
-static char emerg_getc()
+static char emerg_getc(void)
{
while(uart_rxempty_read());
char c = uart_rxtx_read();