On 04/27/2016 11:00 PM, Stefan Berger wrote:
"Rpm-maint" <rpm-maint-boun...@lists.rpm.org> wrote on 04/27/2016
05:45:56 AM:
I get the following warning:
ima.c:23:1: warning: ‘PACKED’ attribute directive ignored [-Wattributes]
} __attribute__((PACKED));
May be there is an simpler way to check for the header being zeros only?
One way of doing it would be to create an array of 9 zero bytes (with a
comment of what it represents) and compare against that.
Yes, and there's precedent for that in rpm, at least:
http://rpm.org/gitweb?p=rpm.git;a=blob;f=rpmio/rpmkeyring.c;h=ac3e3bc5ab4cc240318605e2f82797872f19604e;hb=HEAD#l218
I guess you wouldn't like gcc #pragma tricks to disable -Wattributes in
this case.
Compiler specifics are nasty, no need for that here because there's a
simple, standard solution.
- Panu -
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint