These are never initialized, but still checked in compare_headers(), so
gcc-12 is right when it complains about uninitialized use. Fix this by
simply removing the uninitialized fields and the comparisons. Fix also
a whitespace issue in the definition of compare_headers() while at it.
unsigned int freq;
unsigned int padding;
unsigned int mode;
- unsigned int copyright;
- unsigned int original;
- unsigned int emphasis;
};
static const int frequencies[3][4] = {
+ header->padding;
}
-static int compare_headers(struct mp3header *h1,struct mp3header *h2)
+static int compare_headers(struct mp3header *h1, struct mp3header *h2)
{
if ((*(unsigned int*)h1) == (*(unsigned int*)h2))
return 1;
(h1->layer == h2->layer) &&
(h1->crc == h2->crc) &&
(h1->freq == h2->freq) &&
- (h1->mode == h2->mode) &&
- (h1->copyright == h2->copyright) &&
- (h1->original == h2->original) &&
- (h1->emphasis == h2->emphasis))
+ (h1->mode == h2->mode))
return 1;
return 0;
}