Stub clog causes unused variable errors if the variables are only used in logs
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cpp
- Domain
- observability, tooling
Research direction
Start with the QuicTraceEventStubVarArgs definition and the QuicTraceEvent macro shown in the issue, then inspect how CLOG emits or uses this stub when logging is disabled. Verify the change with a compilation case where variables are referenced only through logging, and consider the work done when that case no longer produces unused-variable errors.
Written by the indexing model from the issue text.
Description
inline
void
QuicTraceEventStubVarArgs(
_In_ const void* Fmt,
...
)
{
UNREFERENCED_PARAMETER(Fmt);
}
#define QuicTraceEvent(Name, ...) QuicTraceEventStubVarArgs("", __VA_ARGS__)
In msquic, we use the following trick to make sure the compiler sees all logs as referenced, rather then just defining away the macro.
- Dominant language
- C#
- Stars
- 36
- Forks
- 15
- Avg merge
- 1d 5m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
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.
More from microsoft/CLOG
-
sidecar
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 50/100
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 35/100
-
bug help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 38/100
-
decode enhancement help wanted
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
nightscout/nocturne#1379 ·
-
priority-0
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
StackExchange/StackExchange.Redis#3249 ·
-
[Feat] 조합 영역 구분선 개선 Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100