A semicolon after a DEFINE_VECTOR_TYPE(...) macro invocation is not
needed, nor does our documentation in "common/utils/vector.h" prescribe
one. Furthermore, it breaks ISO C, which gcc reports with "-Wpedantic":

> warning: ISO C does not allow extra ‘;’ outside of a function
> [-Wpedantic]

Remove the semicolons. (Note that we have such DEFINE_VECTOR_TYPE()
invocations too that are not followed by a semicolon, so our current usage
is inconsistently wrong.)

Signed-off-by: Laszlo Ersek <ler...@redhat.com>
---

Notes:
    v4:
    - new patch in v4

 lib/internal.h                     | 2 +-
 common/utils/const-string-vector.h | 2 +-
 common/utils/nbdkit-string.h       | 2 +-
 common/utils/string-vector.h       | 2 +-
 common/utils/test-vector.c         | 4 ++--
 copy/nbdcopy.h                     | 2 +-
 6 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lib/internal.h b/lib/internal.h
index 0b5f793011b8..b88b43ec6e6b 100644
--- a/lib/internal.h
+++ b/lib/internal.h
@@ -71,7 +71,7 @@ struct meta_context {
   char *name;                   /* Name of meta context. */
   uint32_t context_id;          /* Context ID negotiated with the server. */
 };
-DEFINE_VECTOR_TYPE (meta_vector, struct meta_context);
+DEFINE_VECTOR_TYPE (meta_vector, struct meta_context)
 
 struct export {
   char *name;
diff --git a/common/utils/const-string-vector.h 
b/common/utils/const-string-vector.h
index c15f8952b3b3..d537fedd646f 100644
--- a/common/utils/const-string-vector.h
+++ b/common/utils/const-string-vector.h
@@ -37,6 +37,6 @@
 
 #include "vector.h"
 
-DEFINE_VECTOR_TYPE (const_string_vector, const char *);
+DEFINE_VECTOR_TYPE (const_string_vector, const char *)
 
 #endif /* CONST_STRING_VECTOR_H */
diff --git a/common/utils/nbdkit-string.h b/common/utils/nbdkit-string.h
index b85f05991a82..81bbe9f45784 100644
--- a/common/utils/nbdkit-string.h
+++ b/common/utils/nbdkit-string.h
@@ -37,6 +37,6 @@
 
 #include "vector.h"
 
-DEFINE_VECTOR_TYPE (string, char);
+DEFINE_VECTOR_TYPE (string, char)
 
 #endif /* NBDKIT_STRING_H */
diff --git a/common/utils/string-vector.h b/common/utils/string-vector.h
index aa33fd48ceb5..373eb319120a 100644
--- a/common/utils/string-vector.h
+++ b/common/utils/string-vector.h
@@ -37,6 +37,6 @@
 
 #include "vector.h"
 
-DEFINE_VECTOR_TYPE (string_vector, char *);
+DEFINE_VECTOR_TYPE (string_vector, char *)
 
 #endif /* STRING_VECTOR_H */
diff --git a/common/utils/test-vector.c b/common/utils/test-vector.c
index 55c8ebeb8a1e..27c8da1c06ab 100644
--- a/common/utils/test-vector.c
+++ b/common/utils/test-vector.c
@@ -50,8 +50,8 @@
 
 #define APPENDS 1000000
 
-DEFINE_VECTOR_TYPE (int64_vector, int64_t);
-DEFINE_VECTOR_TYPE (uint32_vector, uint32_t);
+DEFINE_VECTOR_TYPE (int64_vector, int64_t)
+DEFINE_VECTOR_TYPE (uint32_vector, uint32_t)
 
 static int
 compare (const int64_t *a, const int64_t *b)
diff --git a/copy/nbdcopy.h b/copy/nbdcopy.h
index b6257cc13951..5e1e078b34cb 100644
--- a/copy/nbdcopy.h
+++ b/copy/nbdcopy.h
@@ -116,7 +116,7 @@ struct extent {
   uint64_t length;
   bool zero;
 };
-DEFINE_VECTOR_TYPE (extent_list, struct extent);
+DEFINE_VECTOR_TYPE (extent_list, struct extent)
 
 /* The operations struct hides some of the differences between local
  * file, NBD and pipes from the copying code.

_______________________________________________
Libguestfs mailing list
Libguestfs@redhat.com
https://listman.redhat.com/mailman/listinfo/libguestfs

Reply via email to