mirror of
https://github.com/janet-lang/janet
synced 2025-04-07 15:56:39 +00:00
Address compilation warnings and errors.
This commit is contained in:
parent
55cf9f5e1c
commit
6ea530cc48
@ -1400,7 +1400,7 @@ static Janet cfun_peg_replace_generic(int32_t argc, Janet *argv, int only_one) {
|
||||
janet_buffer_push_bytes(ret, c.bytes.bytes + trail, (i - trail));
|
||||
trail = i;
|
||||
}
|
||||
int32_t nexti = result - c.bytes.bytes;
|
||||
int32_t nexti = (int32_t)(result - c.bytes.bytes);
|
||||
janet_buffer_push_bytes(ret, c.repl.bytes, c.repl.len);
|
||||
trail = nexti;
|
||||
if (nexti == i) nexti++;
|
||||
|
@ -100,6 +100,9 @@ void janet_core_cfuns(JanetTable *env, const char *regprefix, const JanetReg *cf
|
||||
/* Clock gettime */
|
||||
#if !defined(JANET_REDUCED_OS) || !defined(JANET_SINGLE_THREADED)
|
||||
#include <time.h>
|
||||
#ifndef JANET_WINDOWS
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#define JANET_GETTIME
|
||||
int janet_gettime(struct timespec *spec);
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user