Skip to content

Compile error: parameter name omitted #101

@Lzeyuan

Description

@Lzeyuan

Hi team.

I compile the project in fedora 42 with gcc 15.2 failed #97. But do well in ubuntu 24.04 with gcc 13.3.

I',m commit e18597c recently, but the CI failed due to "parameter name omitted" in aarch64 ci. Upon checking some documentation, I found some issues that require your decision.

  1. use __attribute__((unused)) , but it depends compiler.
  2. use [[maybe_unused]] , but it depends c23.
  3. use (void) unused, but add extra code.

In my opinion, the third option is optimal. While it adds some extra code, it maintains full compatibility with different compilers and language versions. However, since this touches on coding style (specifically, the recommended practice of using macros for unused variables), the final decision should be left to your team's discretion.

Ok, I see fix approved #100 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions