otp icon indicating copy to clipboard operation
otp copied to clipboard

erts: fix static function prototypes

Open joaohf opened this issue 6 months ago • 2 comments

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();

joaohf avatar Jun 19 '25 21:06 joaohf

CT Test Results

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

Results for commit fb998121.

:recycle: 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

github-actions[bot] avatar Jun 19 '25 21:06 github-actions[bot]

Hi,

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

joaohf avatar Jun 19 '25 21:06 joaohf

Sorry about the slow response, I was going to merge it but completely forgot about this until #10190 was opened. :-(

The license header check is failing now, can you add a license header to both of the port_test.c files you changed?

/*
 * %CopyrightBegin%
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Copyright Ericsson AB 1996-2025. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * %CopyrightEnd%
 */

jhogberg avatar Sep 22 '25 10:09 jhogberg

Hi @jhogberg

Done.

Let me know if you need anything else here.

Thanks.

joaohf avatar Sep 23 '25 00:09 joaohf

Thanks, I think this needs to rebased to latest master to fix an issue with building wxWidgets on Mac. Other than that, this is ready to merge.

jhogberg avatar Sep 24 '25 09:09 jhogberg

Err, sorry, latest maint, not master.

jhogberg avatar Sep 24 '25 09:09 jhogberg

Hi,

I've just rebased.

Thanks.

joaohf avatar Sep 24 '25 13:09 joaohf

Merged, thanks again for the PR!

jhogberg avatar Sep 25 '25 14:09 jhogberg