Skip to content

erts: fix static function prototypes #9983

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

Open
wants to merge 1 commit into
base: maint
Choose a base branch
from

Conversation

joaohf
Copy link
Contributor

@joaohf joaohf commented Jun 19, 2025

GCC 15 complains about function prototypes without arguments:

| port_test.c: In function 'packet_loop':
| port_test.c:235:7: error: too many arguments to function 'ensure_buf_big_enough'; expected 0, have 1
| 235 | ensure_buf_big_enough(port_data->header_size);
| | ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
| port_test.c:75:13: note: declared here
| 75 | static void ensure_buf_big_enough();

GCC 15 complains about function prototypes without arguments:

| port_test.c: In function 'packet_loop':
| port_test.c:235:7: error: too many arguments to function 'ensure_buf_big_enough'; expected 0, have 1
|   235 |       ensure_buf_big_enough(port_data->header_size);
|       |       ^~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
| port_test.c:75:13: note: declared here
|    75 | static void ensure_buf_big_enough();
Copy link
Contributor

github-actions bot commented Jun 19, 2025

CT Test Results

    3 files    142 suites   49m 21s ⏱️
1 649 tests 1 592 ✅ 57 💤 0 ❌
2 372 runs  2 295 ✅ 77 💤 0 ❌

Results for commit f544d3c.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
replace_stdout(port_data->output_file);

if (port_data->fd_count)
reply(&fd_count, sizeof(fd_count));
reply((char *) &fd_count, sizeof(fd_count));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might be not a good idea. Any thought ?

Copy link
Contributor

Choose a reason for hiding this comment

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

This is what reply expects, so let's not change anything here.

@joaohf
Copy link
Contributor Author

joaohf commented Jun 19, 2025

Hi,

This fix is also valid for master, 28, 27, 26, 25.

@IngelaAndin IngelaAndin added the team:VM Assigned to OTP team VM label Jun 24, 2025
@jhogberg jhogberg self-assigned this Jun 30, 2025
Copy link
Contributor

@jhogberg jhogberg left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, I'll add it to our nightly runs. :-)

@@ -212,7 +212,7 @@ int main(int argc, char *argv[])
replace_stdout(port_data->output_file);

if (port_data->fd_count)
reply(&fd_count, sizeof(fd_count));
reply((char *) &fd_count, sizeof(fd_count));
Copy link
Contributor

Choose a reason for hiding this comment

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

This is what reply expects, so let's not change anything here.

@jhogberg jhogberg added the testing currently being tested, tag is used by OTP internal CI label Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants