This is an automated email from the ASF dual-hosted git repository.

kszucs pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/master by this push:
     new 9460bb7  ARROW-4346: [C++] Fix class-memaccess warning on gcc 8.x
9460bb7 is described below

commit 9460bb733a9fc7802e31c35d3c70e74c0928959c
Author: Wes McKinney <[email protected]>
AuthorDate: Thu Jan 24 10:47:02 2019 +0100

    ARROW-4346: [C++] Fix class-memaccess warning on gcc 8.x
    
    Author: Wes McKinney <[email protected]>
    
    Closes #3467 from wesm/ARROW-4346 and squashes the following commits:
    
    248f38c3 <Wes McKinney> Fix class-memaccess warning on gcc 8.x
---
 cpp/src/parquet/encoding.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cpp/src/parquet/encoding.h b/cpp/src/parquet/encoding.h
index 006f22f..ceda736 100644
--- a/cpp/src/parquet/encoding.h
+++ b/cpp/src/parquet/encoding.h
@@ -117,7 +117,8 @@ class Decoder {
 
     // Depending on the number of nulls, some of the value slots in buffer may
     // be uninitialized, and this will cause valgrind warnings / potentially UB
-    memset(buffer + values_read, 0, (num_values - values_read) * sizeof(T));
+    memset(static_cast<void*>(buffer + values_read), 0,
+           (num_values - values_read) * sizeof(T));
 
     // Add spacing for null entries. As we have filled the buffer from the 
front,
     // we need to add the spacing from the back.

Reply via email to