Skip to content

Fix test_async_mainloop WRT to new clang warning regarding "main" decl. NFC #22351

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@
#include <emscripten.h>
#include <assert.h>

extern "C" {

void EMSCRIPTEN_KEEPALIVE finish(int result) {
void finish(int result) {
assert(result == 121);
emscripten_force_exit(0);
}
Expand All @@ -20,7 +18,8 @@ int nesting = 0;
void iter() {
printf("frame: %d\n", ++counter);

// ensure we don't 'recurse' with the main loop sending us back in before the synchronous operation callback finishes the rest of this trace
// ensure we don't 'recurse' with the main loop sending us back in before the
// synchronous operation callback finishes the rest of this trace
assert(nesting == 0);
nesting++;
emscripten_sleep(500);
Expand All @@ -36,6 +35,3 @@ void iter() {
int main() {
emscripten_set_main_loop(iter, 0, 0);
}

}

2 changes: 1 addition & 1 deletion test/test_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -3191,7 +3191,7 @@ def test_async_virtual_2(self, args):
'O3': (['-O3'],),
})
def test_async_mainloop(self, args):
self.btest_exit('async_mainloop.cpp', args=args + ['-sASYNCIFY'])
self.btest_exit('test_async_mainloop.c', args=args + ['-sASYNCIFY'])

@requires_sound_hardware
@parameterized({
Expand Down
Loading