]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libsmartcols: fix warning "unused parameter"
authorRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 13 Jun 2017 09:08:10 +0000 (11:08 +0200)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Tue, 13 Jun 2017 21:39:22 +0000 (23:39 +0200)
Noticed on OSX.

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
libsmartcols/src/table_print.c

index 8e37c80cbb34f3bc642b81f4774ab214d10d1f5f..1152121015e98f1ef9c15b483a8f8588c281ae5f 100644 (file)
@@ -1656,9 +1656,9 @@ int scols_print_table(struct libscols_table *tb)
  *
  * Returns: 0, a negative value in case of an error.
  */
+#ifdef HAVE_OPEN_MEMSTREAM
 int scols_print_table_to_string(struct libscols_table *tb, char **data)
 {
-#ifdef HAVE_OPEN_MEMSTREAM
        FILE *stream, *old_stream;
        size_t sz;
        int rc;
@@ -1680,8 +1680,13 @@ int scols_print_table_to_string(struct libscols_table *tb, char **data)
        scols_table_set_stream(tb, old_stream);
 
        return rc;
+}
 #else
+int scols_print_table_to_string(
+               struct libscols_table *tb __attribute__((__unused__)),
+               char **data  __attribute__((__unused__)))
+{
        return -ENOSYS;
-#endif
 }
+#endif