Message ID | 1354871151-11593-2-git-send-email-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On Fri, Dec 7, 2012 at 5:05 PM, Colin King <colin.king@canonical.com> wrote: > From: Colin Ian King <colin.king@canonical.com> > > The dummy no-op CMOS fwts_cmos_read() for non-Intel builds > is causing build failures because of the -Wextra flag: > > fwts_cmos.c: In function 'fwts_cmos_read': > fwts_cmos.c:53:34: error: unused parameter 'offset' [-Werror=unused-parameter] > fwts_cmos.c:53:51: error: unused parameter 'value' [-Werror=unused-parameter] > > This fixes this and makes the no-op function return a known garbage > value. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_cmos.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/lib/src/fwts_cmos.c b/src/lib/src/fwts_cmos.c > index 583bbb4..7b0ca40 100644 > --- a/src/lib/src/fwts_cmos.c > +++ b/src/lib/src/fwts_cmos.c > @@ -52,6 +52,10 @@ int fwts_cmos_read(const uint8_t offset, uint8_t *value) > #else > int fwts_cmos_read(const uint8_t offset, uint8_t *value) > { > + FWTS_UNUSED(offset); > + > + *value = ~0; /* Fake a failed read */ > + > return FWTS_ERROR; > } > #endif > -- > 1.8.0 > Acked-by: Keng-Yu Lin <kengyu@canonical.com>
On 12/07/2012 05:05 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > The dummy no-op CMOS fwts_cmos_read() for non-Intel builds > is causing build failures because of the -Wextra flag: > > fwts_cmos.c: In function 'fwts_cmos_read': > fwts_cmos.c:53:34: error: unused parameter 'offset' [-Werror=unused-parameter] > fwts_cmos.c:53:51: error: unused parameter 'value' [-Werror=unused-parameter] > > This fixes this and makes the no-op function return a known garbage > value. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/src/fwts_cmos.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/lib/src/fwts_cmos.c b/src/lib/src/fwts_cmos.c > index 583bbb4..7b0ca40 100644 > --- a/src/lib/src/fwts_cmos.c > +++ b/src/lib/src/fwts_cmos.c > @@ -52,6 +52,10 @@ int fwts_cmos_read(const uint8_t offset, uint8_t *value) > #else > int fwts_cmos_read(const uint8_t offset, uint8_t *value) > { > + FWTS_UNUSED(offset); > + > + *value = ~0; /* Fake a failed read */ > + > return FWTS_ERROR; > } > #endif > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/src/fwts_cmos.c b/src/lib/src/fwts_cmos.c index 583bbb4..7b0ca40 100644 --- a/src/lib/src/fwts_cmos.c +++ b/src/lib/src/fwts_cmos.c @@ -52,6 +52,10 @@ int fwts_cmos_read(const uint8_t offset, uint8_t *value) #else int fwts_cmos_read(const uint8_t offset, uint8_t *value) { + FWTS_UNUSED(offset); + + *value = ~0; /* Fake a failed read */ + return FWTS_ERROR; } #endif