isocpp / isocpp/CppCoreGuidelines
ES.30: Don’t use macros for program text manipulation - example warnings
Open
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 45.3k
- Forks
- 5.6k
- PR merge metrics
- No merged PRs in 30d
Description
There is a warning about the unused x,y params in the example - Can those x,y there be removed?
<source>: In function 'void f(int, int)':
<source>:17:12: warning: unused parameter 'x' [-Wunused-parameter]
17 | void f(int x, int y)
| ~~~~^
<source>:17:19: warning: unused parameter 'y' [-Wunused-parameter]
17 | void f(int x, int y)
| ~~~~^
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the ES.30 example referenced in the issue and compare its compiler output with the linked Godbolt example. Remove the unused x and y parameters if they are not needed, then verify that the example no longer emits those unused-parameter warnings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100