Fix warning about "may be used uninitialized"
This commit is contained in:
parent
91770e1c56
commit
8820ba29df
|
@ -941,7 +941,7 @@ struct Coverage
|
||||||
}
|
}
|
||||||
|
|
||||||
struct Iter {
|
struct Iter {
|
||||||
Iter (void) : format (0) {};
|
Iter (void) : format (0), u () {};
|
||||||
inline void init (const Coverage &c_) {
|
inline void init (const Coverage &c_) {
|
||||||
format = c_.u.format;
|
format = c_.u.format;
|
||||||
switch (format) {
|
switch (format) {
|
||||||
|
@ -982,8 +982,8 @@ struct Coverage
|
||||||
private:
|
private:
|
||||||
unsigned int format;
|
unsigned int format;
|
||||||
union {
|
union {
|
||||||
|
CoverageFormat2::Iter format2; /* Put this one first since it's larger; helps shut up compiler. */
|
||||||
CoverageFormat1::Iter format1;
|
CoverageFormat1::Iter format1;
|
||||||
CoverageFormat2::Iter format2;
|
|
||||||
} u;
|
} u;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue