Message ID | 20170315100459.24607-1-colin.king@canonical.com |
---|---|
State | Accepted |
Headers | show |
On 2017-03-15 06:04 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Replace gcc attribute with FWTS_UNUSED() macro, and reformat > function prototypes. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/include/fwts_devicetree.h | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/src/lib/include/fwts_devicetree.h b/src/lib/include/fwts_devicetree.h > index 372bdda..662f6ec 100644 > --- a/src/lib/include/fwts_devicetree.h > +++ b/src/lib/include/fwts_devicetree.h > @@ -44,22 +44,19 @@ > int fwts_devicetree_read(fwts_framework *fwts); > > #else /* !FWTS_HAS_DEVICETREE */ > -static inline int fwts_devicetree_read(fwts_framework *fwts > - __attribute__((unused))) > +static inline int fwts_devicetree_read(fwts_framework *fwts) > { > + FWTS_UNUSED(fwts); > + > return FWTS_OK; > } > #endif > > bool check_status_property_okay(fwts_framework *fw, > - const char *my_path, > - const char *my_prop_string, > - const char *property); > + const char *my_path, const char *my_prop_string, const char *property); > > int check_property_printable(fwts_framework *fw, > - const char *name, > - const char *buf, > - size_t len); > + const char *name, const char *buf, size_t len); > > char *hidewhitespace(char *name); > > Acked-by: Alex Hung <alex.hung@canonical.com>
On 03/15/2017 06:04 PM, Colin King wrote: > From: Colin Ian King <colin.king@canonical.com> > > Replace gcc attribute with FWTS_UNUSED() macro, and reformat > function prototypes. > > Signed-off-by: Colin Ian King <colin.king@canonical.com> > --- > src/lib/include/fwts_devicetree.h | 13 +++++-------- > 1 file changed, 5 insertions(+), 8 deletions(-) > > diff --git a/src/lib/include/fwts_devicetree.h b/src/lib/include/fwts_devicetree.h > index 372bdda..662f6ec 100644 > --- a/src/lib/include/fwts_devicetree.h > +++ b/src/lib/include/fwts_devicetree.h > @@ -44,22 +44,19 @@ > int fwts_devicetree_read(fwts_framework *fwts); > > #else /* !FWTS_HAS_DEVICETREE */ > -static inline int fwts_devicetree_read(fwts_framework *fwts > - __attribute__((unused))) > +static inline int fwts_devicetree_read(fwts_framework *fwts) > { > + FWTS_UNUSED(fwts); > + > return FWTS_OK; > } > #endif > > bool check_status_property_okay(fwts_framework *fw, > - const char *my_path, > - const char *my_prop_string, > - const char *property); > + const char *my_path, const char *my_prop_string, const char *property); > > int check_property_printable(fwts_framework *fw, > - const char *name, > - const char *buf, > - size_t len); > + const char *name, const char *buf, size_t len); > > char *hidewhitespace(char *name); > > Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff --git a/src/lib/include/fwts_devicetree.h b/src/lib/include/fwts_devicetree.h index 372bdda..662f6ec 100644 --- a/src/lib/include/fwts_devicetree.h +++ b/src/lib/include/fwts_devicetree.h @@ -44,22 +44,19 @@ int fwts_devicetree_read(fwts_framework *fwts); #else /* !FWTS_HAS_DEVICETREE */ -static inline int fwts_devicetree_read(fwts_framework *fwts - __attribute__((unused))) +static inline int fwts_devicetree_read(fwts_framework *fwts) { + FWTS_UNUSED(fwts); + return FWTS_OK; } #endif bool check_status_property_okay(fwts_framework *fw, - const char *my_path, - const char *my_prop_string, - const char *property); + const char *my_path, const char *my_prop_string, const char *property); int check_property_printable(fwts_framework *fw, - const char *name, - const char *buf, - size_t len); + const char *name, const char *buf, size_t len); char *hidewhitespace(char *name);