Repository navigation
Conversation
This was another bug that clang 14 apparently treated as a warning, but clang 18 treats is as an error.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new sq.h declaration uses an empty parameter list (getNextWakeupUsecs()), which is not a strict C prototype and can still trigger Clang -Wstrict-prototypes errors.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR centralizes the declaration of getNextWakeupUsecs into the shared cross-platform header to avoid Clang 18 build failures caused by missing/incorrect function prototypes.
Changes:
- Removed per-function
extern usqLong getNextWakeupUsecs...declarations from multiple Unix/iOS heartbeat-related call sites. - Added a
getNextWakeupUsecsdeclaration toplatforms/Cross/vm/sq.hso all platforms see a consistent prototype.
File summaries
| File | Description |
|---|---|
| platforms/unix/vm/sqUnixITimerTickerHeartbeat.c | Removes local getNextWakeupUsecs forward declaration in favor of the shared header. |
| platforms/unix/vm/sqUnixITimerHeartbeat.c | Same: relies on header prototype instead of local extern. |
| platforms/unix/vm/sqUnixHeartbeat.c | Same: removes local extern declaration to use shared header. |
| platforms/unix/vm-display-X11/sqUnixX11.c | Same: removes local extern ... (void) declaration in the X11 display heartbeat path. |
| platforms/unix/vm-display-null/sqUnixDisplayNull.c | Same: removes local extern ... (void) declaration in the null-display path. |
| platforms/unix/misc/threadValidate/sqUnixHeartbeat.c | Same: removes local extern declaration in thread validation build. |
| platforms/minheadless/unix/sqUnixHeartbeat.c | Same: removes local extern declaration in minheadless build. |
| platforms/iOS/vm/Common/Classes/sqMacV2Time.c | Same: removes local extern ... (void) declaration from iOS time code. |
| platforms/Cross/vm/sq.h | Adds a shared declaration for getNextWakeupUsecs (but should be a strict prototype). |
Review details
- Files reviewed: 9/9 changed files
- Comments generated: 1
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This was another bug that clang 14 apparently treated as a warning, but clang 18 treats is as an error.