Skip to content

Commit 4e85fbf

Browse files
committed
Fix signature of certain Emscripten runtime functions to read as void(void) for C code.
1 parent 230da8d commit 4e85fbf

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

system/include/emscripten/emscripten.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ int emscripten_get_worker_queue_size(worker_handle worker);
223223

224224
int emscripten_get_compiler_setting(const char *name);
225225

226-
void emscripten_debugger();
226+
void emscripten_debugger(void);
227227

228228
char *emscripten_get_preloaded_image_data(const char *path, int *w, int *h);
229229
char *emscripten_get_preloaded_image_data_from_FILE(FILE *file, int *w, int *h);

system/include/emscripten/threading.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ extern "C" {
1111

1212
// Returns true if the current browser is able to spawn threads with pthread_create(), and the compiled page was built with
1313
// threading support enabled. If this returns 0, calls to pthread_create() will fail with return code EAGAIN.
14-
int emscripten_has_threading_support();
14+
int emscripten_has_threading_support(void);
1515

1616
// Returns the number of logical cores on the system.
17-
int emscripten_num_logical_cores();
17+
int emscripten_num_logical_cores(void);
1818

1919
// Configures the number of logical cores on the system. This can be called at startup
2020
// to specify the number of cores emscripten_num_logical_cores() reports. The
@@ -52,7 +52,7 @@ float emscripten_atomic_store_f32(void/*float*/ *addr, float val);
5252
uint64_t emscripten_atomic_store_u64(void/*uint64_t*/ *addr, uint64_t val); // Emulated with locks, very slow!!
5353
double emscripten_atomic_store_f64(void/*double*/ *addr, double val); // Emulated with locks, very slow!!
5454

55-
void emscripten_atomic_fence();
55+
void emscripten_atomic_fence(void);
5656

5757
// Each of the functions below (add, sub, and, or, xor) returns the value that was stored to memory after the operation occurred.
5858
uint8_t emscripten_atomic_add_u8(void/*uint8_t*/ *addr, uint8_t val);
@@ -181,7 +181,7 @@ int emscripten_is_main_browser_thread(void);
181181
// Call this in the body of all lock-free atomic (cas) loops that the main thread might enter
182182
// which don't otherwise call to any pthread api calls (mutexes) or C runtime functions
183183
// that are considered cancellation points.
184-
void emscripten_main_thread_process_queued_calls();
184+
void emscripten_main_thread_process_queued_calls(void);
185185

186186
// Direct syscall access, second argument is a varargs pointer. used in proxying
187187
int emscripten_syscall(int, void*);

0 commit comments

Comments
 (0)