vec.h: Add casts for C++ compat
authorSimon Marchi <simon.marchi@ericsson.com>
Thu, 1 Oct 2015 15:29:08 +0000 (11:29 -0400)
committerSimon Marchi <simon.marchi@ericsson.com>
Thu, 1 Oct 2015 15:29:08 +0000 (11:29 -0400)
gdb/ChangeLog:

* common/vec.h (VEC_OP (T,cleanup)): Add pointer cast.

gdb/ChangeLog
gdb/common/vec.h

index 46b36ad25d23dadabacb439f5782bc11fc4f9b7c..f9ef565634818d8c07c505984268d614a75c0f77 100644 (file)
@@ -1,3 +1,7 @@
+2015-10-01  Simon Marchi  <simon.marchi@ericsson.com>
+
+       * common/vec.h (VEC_OP (T,cleanup)): Add pointer cast.
+
 2015-09-30  Doug Evans  <dje@google.com>
 
        * dwarf2read.c (setup_type_unit_groups): Add comment.
index 41e41b5b22c9f5ec14711aac35ce4ae6bceab1e7..25644857abefee039fd3e8ed649e6998aca9b79e 100644 (file)
@@ -496,7 +496,7 @@ static inline void VEC_OP (T,free)                                    \
 static inline void VEC_OP (T,cleanup)                                    \
      (void *arg_)                                                        \
 {                                                                        \
-  VEC(T) **vec_ = arg_;                                                          \
+  VEC(T) **vec_ = (VEC(T) **) arg_;                                      \
   if (*vec_)                                                             \
     vec_free_ (*vec_);                                                   \
   *vec_ = NULL;                                                                  \
@@ -743,7 +743,7 @@ static inline void VEC_OP (T,free)                                    \
 static inline void VEC_OP (T,cleanup)                                    \
      (void *arg_)                                                        \
 {                                                                        \
-  VEC(T) **vec_ = arg_;                                                          \
+  VEC(T) **vec_ = (VEC(T) **) arg_;                                      \
   if (*vec_)                                                             \
     vec_free_ (*vec_);                                                   \
   *vec_ = NULL;                                                                  \
@@ -1053,7 +1053,7 @@ static inline void VEC_OP (T,free)                                          \
 static inline void VEC_OP (T,cleanup)                                    \
      (void *arg_)                                                        \
 {                                                                        \
-  VEC(T) **vec_ = arg_;                                                          \
+  VEC(T) **vec_ = (VEC(T) **) arg_;                                      \
   if (*vec_)                                                             \
     vec_free_ (*vec_);                                                   \
   *vec_ = NULL;                                                                  \