1
0
mirror of https://github.com/janet-lang/janet synced 2025-01-12 08:30:26 +00:00

Fix warnings.

This commit is contained in:
Calvin Rose 2020-01-28 23:46:14 -06:00
parent 333ae7c4f8
commit 1bdde9c4f7
2 changed files with 8 additions and 4 deletions

View File

@ -156,10 +156,10 @@ build/janetconf.h: src/conf/janetconf.h
cp $< $@ cp $< $@
build/janet.o: build/janet.c build/janet.h build/janetconf.h build/janet.o: build/janet.c build/janet.h build/janetconf.h
$(CC) $(LDFLAGS) $(CFLAGS) -c $< -o $@ -I build $(CLIBS) $(CC) $(CFLAGS) -c $< -o $@ -I build
build/shell.o: build/shell.c build/janet.h build/janetconf.h build/shell.o: build/shell.c build/janet.h build/janetconf.h
$(CC) $(LDFLAGS) $(CFLAGS) -c $< -o $@ -I build $(CLIBS) $(CC) $(CFLAGS) -c $< -o $@ -I build
$(JANET_TARGET): build/janet.o build/shell.o $(JANET_TARGET): build/janet.o build/shell.o
$(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS) $(CC) $(LDFLAGS) $(CFLAGS) -o $@ $^ $(CLIBS)

View File

@ -24,7 +24,7 @@
#include "tests.h" #include "tests.h"
#ifdef JANET_WINDOWS #ifdef JANET_WINDOWS
#include <windows.h> #include <direct.h>
#define chdir(x) _chdir(x) #define chdir(x) _chdir(x)
#else #else
#include <unistd.h> #include <unistd.h>
@ -77,7 +77,11 @@ int main(int argc, const char **argv) {
boot_filename = "boot.janet"; boot_filename = "boot.janet";
#endif #endif
chdir(argv[1]); int chdir_status = chdir(argv[1]);
if (chdir_status) {
fprintf(stderr, "Could not change to directory %s\n", argv[1]);
exit(1);
}
FILE *boot_file = fopen("src/boot/boot.janet", "rb"); FILE *boot_file = fopen("src/boot/boot.janet", "rb");
if (NULL == boot_file) { if (NULL == boot_file) {