diff --git a/examples/ffi/so.c b/examples/ffi/so.c index c60a76e1..b2d097bf 100644 --- a/examples/ffi/so.c +++ b/examples/ffi/so.c @@ -78,7 +78,6 @@ double double_lots( return i + j; } - EXPORTER double double_lots_2( double a, @@ -204,5 +203,3 @@ EXPORTER int sixints_fn_3(SixInts s, int x) { return x + s.u + s.v + s.w + s.x + s.y + s.z; } - - diff --git a/src/boot/system_test.c b/src/boot/system_test.c index 8d58c5e6..0edcc1e4 100644 --- a/src/boot/system_test.c +++ b/src/boot/system_test.c @@ -70,6 +70,5 @@ int system_test() { assert(janet_equals(tuple1, tuple2)); - return 0; } diff --git a/src/core/asm.c b/src/core/asm.c index 043ad64d..b09b7e3a 100644 --- a/src/core/asm.c +++ b/src/core/asm.c @@ -949,7 +949,6 @@ static Janet janet_disasm_symbolslots(JanetFuncDef *def) { return janet_wrap_array(symbolslots); } - static Janet janet_disasm_bytecode(JanetFuncDef *def) { JanetArray *bcode = janet_array(def->bytecode_length); for (int32_t i = 0; i < def->bytecode_length; i++) { diff --git a/src/core/buffer.c b/src/core/buffer.c index 84f8fe08..5e1f76f9 100644 --- a/src/core/buffer.c +++ b/src/core/buffer.c @@ -354,7 +354,6 @@ JANET_CORE_FN(cfun_buffer_push, return argv[0]; } - JANET_CORE_FN(cfun_buffer_clear, "(buffer/clear buffer)", "Sets the size of a buffer to 0 and empties it. The buffer retains " diff --git a/src/core/ev.c b/src/core/ev.c index ad8f5bd4..28585d9f 100644 --- a/src/core/ev.c +++ b/src/core/ev.c @@ -20,7 +20,6 @@ * IN THE SOFTWARE. */ - #ifndef JANET_AMALG #include "features.h" #include @@ -365,7 +364,6 @@ void janet_stream_close(JanetStream *stream) { janet_stream_close_impl(stream, 0); } - /* Called to clean up a stream */ static int janet_stream_gc(void *p, size_t s) { (void) s; @@ -1453,7 +1451,6 @@ JanetListenerState *janet_listen(JanetStream *stream, JanetListener behavior, in return state; } - static void janet_unlisten(JanetListenerState *state, int is_gc) { janet_unlisten_impl(state, is_gc); } @@ -2173,7 +2170,6 @@ void janet_ev_default_threaded_callback(JanetEVGenericMessage return_value) { janet_gcunroot(janet_wrap_fiber(return_value.fiber)); } - /* Convenience method for common case */ JANET_NO_RETURN void janet_ev_threaded_await(JanetThreadedSubroutine fp, int tag, int argi, void *argp) { @@ -2523,7 +2519,6 @@ static JanetAsyncStatus handle_connect(JanetListenerState *s) { return JANET_ASYNC_STATUS_DONE; } - JanetAsyncStatus ev_machine_write(JanetListenerState *s, JanetAsyncEvent event) { StateWrite *state = (StateWrite *) s; switch (event) { @@ -2703,7 +2698,6 @@ static void janet_ev_write_generic(JanetStream *stream, void *buf, void *dest_ab #endif } - void janet_ev_write_buffer(JanetStream *stream, JanetBuffer *buf) { janet_ev_write_generic(stream, buf, NULL, JANET_ASYNC_WRITEMODE_WRITE, 1, 0); } diff --git a/src/core/ffi.c b/src/core/ffi.c index 8fcf7d3c..41e3c04c 100644 --- a/src/core/ffi.c +++ b/src/core/ffi.c @@ -1531,12 +1531,12 @@ JANET_CORE_FN(cfun_ffi_pointer_buffer, } JANET_CORE_FN(cfun_ffi_supported_calling_conventions, - "(ffi/calling-conventions)", - "Get an array of all supported calling conventions on the current arhcitecture. Some architectures may have some FFI " - "functionality (ffi/malloc, ffi/free, ffi/read, ffi/write, etc.) but not support " - "any calling conventions. This function can be used to get all supported calling conventions " - "that can be used on this architecture. All architectures support the :none calling " - "convention which is a placeholder that cannot be used at runtime.") { + "(ffi/calling-conventions)", + "Get an array of all supported calling conventions on the current arhcitecture. Some architectures may have some FFI " + "functionality (ffi/malloc, ffi/free, ffi/read, ffi/write, etc.) but not support " + "any calling conventions. This function can be used to get all supported calling conventions " + "that can be used on this architecture. All architectures support the :none calling " + "convention which is a placeholder that cannot be used at runtime.") { janet_fixarity(argc, 0); (void) argv; JanetArray *array = janet_array(4); diff --git a/src/core/io.c b/src/core/io.c index a1567833..d9a8626a 100644 --- a/src/core/io.c +++ b/src/core/io.c @@ -504,7 +504,6 @@ static Janet cfun_io_print_impl_x(int32_t argc, Janet *argv, int newline, return janet_wrap_nil(); } - static Janet cfun_io_print_impl(int32_t argc, Janet *argv, int newline, const char *name, FILE *dflt_file) { Janet x = janet_dyn(name); diff --git a/src/core/net.c b/src/core/net.c index 273eee36..096b385b 100644 --- a/src/core/net.c +++ b/src/core/net.c @@ -256,7 +256,6 @@ JANET_NO_RETURN static void janet_sched_accept(JanetStream *stream, JanetFunctio janet_await(); } - #endif /* Adress info */ @@ -417,7 +416,6 @@ JANET_CORE_FN(cfun_net_connect, } } - /* Create socket */ JSock sock = JSOCKDEFAULT; void *addr = NULL; diff --git a/src/core/os.c b/src/core/os.c index d59bec98..e4ec5cd6 100644 --- a/src/core/os.c +++ b/src/core/os.c @@ -289,7 +289,6 @@ JANET_CORE_FN(os_cpu_count, #endif } - #ifndef JANET_NO_PROCESSES /* Get env for os_execute */ @@ -1076,7 +1075,6 @@ static Janet os_execute_impl(int32_t argc, Janet *argv, int is_spawn) { startupInfo.hStdInput = (HANDLE) _get_osfhandle(0); } - if (pipe_out != JANET_HANDLE_NONE) { startupInfo.hStdOutput = pipe_out; } else if (new_out != JANET_HANDLE_NONE) { diff --git a/src/core/specials.c b/src/core/specials.c index 5420f6c2..4f2b9740 100644 --- a/src/core/specials.c +++ b/src/core/specials.c @@ -182,7 +182,6 @@ static int destructure(JanetCompiler *c, return 1; } - if (!janet_checktype(values[i + 1], JANET_SYMBOL)) { janetc_error(c, janet_formatc("expected symbol following '& in destructuring pattern, found %q", values[i + 1])); return 1; @@ -651,7 +650,6 @@ static JanetSlot janetc_do(JanetFopts opts, int32_t argn, const Janet *argv) { return ret; } - /* Compile an upscope form. Upscope forms execute their body sequentially and * evaluate to the last expression in the body, but without lexical scope. */ static JanetSlot janetc_upscope(JanetFopts opts, int32_t argn, const Janet *argv) { @@ -1124,4 +1122,3 @@ const JanetSpecial *janetc_special(const uint8_t *name) { sizeof(JanetSpecial), name); } - diff --git a/src/include/janet.h b/src/include/janet.h index 40f1a0fe..509b194e 100644 --- a/src/include/janet.h +++ b/src/include/janet.h @@ -354,7 +354,6 @@ typedef struct JanetOSRWLock JanetOSRWLock; #include #include - /* What to do when out of memory */ #ifndef JANET_OUT_OF_MEMORY #define JANET_OUT_OF_MEMORY do { fprintf(stderr, "%s:%d - janet out of memory\n", __FILE__, __LINE__); exit(1); } while (0) @@ -1905,7 +1904,6 @@ JANET_API Janet janet_resolve_core(const char *name); #define JANET_DEF_SD(ENV, JNAME, VAL, DOC) \ janet_def_sm(ENV, JNAME, VAL, DOC, __FILE__, __LINE__) - /* Choose defaults for source mapping and docstring based on config defs */ #if defined(JANET_NO_SOURCEMAPS) && defined(JANET_NO_DOCSTRINGS) #define JANET_REG JANET_REG_ diff --git a/src/mainclient/shell.c b/src/mainclient/shell.c index 3c1b13fc..a85b2246 100644 --- a/src/mainclient/shell.c +++ b/src/mainclient/shell.c @@ -548,7 +548,6 @@ static void kdeletew(void) { refresh(); } - /* See tools/symchargen.c */ static int is_symbol_char_gen(uint8_t c) { if (c & 0x80) return 1;