summaryrefslogtreecommitdiffstats
path: root/third_party/jpeg-xl/lib/jpegli/decode_api_test.cc
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--third_party/jpeg-xl/lib/jpegli/decode_api_test.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/third_party/jpeg-xl/lib/jpegli/decode_api_test.cc b/third_party/jpeg-xl/lib/jpegli/decode_api_test.cc
index 0cc5a194d7..3ecd479951 100644
--- a/third_party/jpeg-xl/lib/jpegli/decode_api_test.cc
+++ b/third_party/jpeg-xl/lib/jpegli/decode_api_test.cc
@@ -3,8 +3,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-#include <cmath>
#include <cstdint>
+#include <cstdio>
#include <vector>
#include "lib/jpegli/decode.h"
@@ -78,7 +78,8 @@ class SourceManager {
return TRUE;
}
- static void skip_input_data(j_decompress_ptr cinfo, long num_bytes) {
+ static void skip_input_data(j_decompress_ptr cinfo,
+ long num_bytes /* NOLINT */) {
auto* src = reinterpret_cast<SourceManager*>(cinfo->src);
if (num_bytes <= 0) {
return;
@@ -447,7 +448,7 @@ std::vector<TestConfig> GenerateBasicConfigs() {
TEST(DecodeAPITest, ReuseCinfoSameMemSource) {
std::vector<TestConfig> all_configs = GenerateBasicConfigs();
uint8_t* buffer = nullptr;
- unsigned long buffer_size = 0;
+ unsigned long buffer_size = 0; // NOLINT
{
jpeg_compress_struct cinfo;
const auto try_catch_block = [&]() -> bool {
@@ -502,7 +503,7 @@ TEST(DecodeAPITest, ReuseCinfoSameStdSource) {
EXPECT_TRUE(try_catch_block());
jpegli_destroy_compress(&cinfo);
}
- rewind(tmpf);
+ fseek(tmpf, 0, SEEK_SET);
std::vector<TestImage> all_outputs(all_configs.size());
{
jpeg_decompress_struct cinfo;
@@ -527,9 +528,9 @@ TEST(DecodeAPITest, ReuseCinfoSameStdSource) {
TEST(DecodeAPITest, AbbreviatedStreams) {
uint8_t* table_stream = nullptr;
- unsigned long table_stream_size = 0;
+ unsigned long table_stream_size = 0; // NOLINT
uint8_t* data_stream = nullptr;
- unsigned long data_stream_size = 0;
+ unsigned long data_stream_size = 0; // NOLINT
{
jpeg_compress_struct cinfo;
const auto try_catch_block = [&]() -> bool {