A few small fixes

parent 5643d4be
dukboots.exe
dukboots
node_modules
dukboot.exe
makeheaders.exe
......@@ -15,7 +15,7 @@ compile-for-alpine:
- mv dukboot dukboot-alpine
artifacts:
paths:
- dukboots-alpine
- dukboot-alpine
compile-for-ubuntu:
image: ubuntu
......
CC = gcc
CFLAGS = -fopenmp -I./lib/duktape -Os -pedantic -std=c99 -Wall -fstrict-aliasing -fomit-frame-pointer -D_GNU_SOURCE
LDFLAGS = -static -static-libgcc -lm
ifeq ($(OS),Windows_NT)
BIN = dukboot.exe
......@@ -16,7 +17,7 @@ DEPS = $(wildcard lib/duktape/*.c)
DEPOBJS = $(DEPS:.c=.o)
main: $(MAKEHEADERS) $(HEADERS) $(DEPOBJS) $(OBJS)
$(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(DEPOBJS) $(LDFLAGS) -lm
$(CC) $(CFLAGS) -o $(BIN) $(OBJS) $(DEPOBJS) $(LDFLAGS)
$(MAKEHEADERS): makeheaders.c
gcc makeheaders.c -o makeheaders
......
......@@ -18,7 +18,7 @@ int app_push_trusted_function (duk_context *ctx) {
// Read the file
char *message = NULL;
char *buffer = NULL;
size_t bytesRead = NULL;
size_t bytesRead = 0;
duk_int_t ret = c_read_script_file(joined_path, &message, &buffer, &bytesRead);
if (ret) {
if (buffer != NULL) free(buffer);
......
......@@ -3,7 +3,7 @@
int native_import (duk_context *ctx, const char *filename) {
char *message = NULL;
char *buffer = NULL;
size_t bytesRead = NULL;
size_t bytesRead = 0;
duk_int_t ret = c_read_script_file(filename, &message, &buffer, &bytesRead);
if (ret) {
if (message != NULL) fprintf(stderr, "%s\n", message);
......
#!/bin/sh
DUKBOOTS="${1:-./dukboots}"
DUKBOOT="${1:-./dukboot}"
NUM_CORES="$(grep -c ^processor /proc/cpuinfo)"
echo "$NUM_CORES cores"
EXPECT_ONE='[12,"index.html"]'
......@@ -8,7 +8,7 @@ for n in $(seq 2 $((NUM_CORES * 1))); do
EXPECT="$EXPECT
$EXPECT_ONE"
done
RESULT="$($DUKBOOTS example/example.js)"
RESULT="$($DUKBOOT example/example.js)"
echo "$EXPECT"
echo "---"
echo "$RESULT"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment