-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Description
The following is a simplification of an actual bug I found in my keyboard remapper code.
// (struct defined in system header)
typedef struct {
int x;
int y;
} Event;
void f(Event *events);
int main()
{
#define EVENTS 2
Event events[EVENTS];
for (int i = 0; i < EVENTS; i++)
f(events + i);
}I don't see a warning in the user part of the code from any of the uninitialized data checks. The only one that kinda works is CPP_DD022 (made by @jasonbquinn) because it works in C but not in C++. This is the best uninitialized data check, but it could still be improved to work in C++.
jarenreber