Skip to content

Make quickjs.h -Wall -Wextra -pedantic clean#628

Merged
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:fix585
Oct 26, 2024
Merged

Make quickjs.h -Wall -Wextra -pedantic clean#628
bnoordhuis merged 1 commit intoquickjs-ng:masterfrom
bnoordhuis:fix585

Conversation

@bnoordhuis
Copy link
Copy Markdown
Contributor

Fixes: #585


static js_force_inline JSValue JS_NewBool(JSContext *ctx, JS_BOOL val)
{
(void)&ctx;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the & necessary? I thought (void)ctx; would be enough.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not necessary here but it's a general precaution, in case the unused thing is a macro that evaluates to something non-addressable (because that probably indicates dead code, or a bug.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TIL!

@bnoordhuis bnoordhuis merged commit d2bca87 into quickjs-ng:master Oct 26, 2024
@bnoordhuis bnoordhuis deleted the fix585 branch October 26, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants