Skip to content

Commit

Permalink
Fix warn_unused_result error in parquet test (#11026)
Browse files Browse the repository at this point in the history
Fix `error: ignoring return value of declared with attribute warn_unused_result` in cpp/tests/io/parquet_test.cpp

Authors:
  - Karthikeyan (https://github.com/karthikeyann)

Approvers:
  - Devavret Makkar (https://github.com/devavret)
  - Bradley Dice (https://github.com/bdice)
  - Yunsong Wang (https://github.com/PointKernel)

URL: #11026
  • Loading branch information
karthikeyann authored Jun 3, 2022
1 parent f5aa39d commit f6c451b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cpp/tests/io/parquet_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3348,7 +3348,7 @@ TEST_F(ParquetWriterTest, CheckPageRows)
// check first page header and make sure it has only 5000 values
int fd = open(filepath.c_str(), O_RDONLY);
unsigned char buf[1024];
read(fd, buf, sizeof(buf));
(void)!read(fd, buf, sizeof(buf));

// check magic
EXPECT_EQ(buf[0], 0x50); // P
Expand Down Expand Up @@ -3378,7 +3378,7 @@ TEST_F(ParquetWriterTest, CheckPageRows)
// seek to next page header and read
int32_t pos = 4 + reader.bytecount() + comp_size;
lseek(fd, pos, SEEK_SET);
read(fd, buf, sizeof(buf));
(void)!read(fd, buf, sizeof(buf));
reader.init(buf, sizeof(buf));

reader.get_i32(); // fld 1
Expand Down

0 comments on commit f6c451b

Please sign in to comment.