Skip to content

Commit 6a24559

Browse files
committed
suppress warnings
+ docu fix
1 parent 514eb21 commit 6a24559

3 files changed

Lines changed: 12 additions & 2 deletions

File tree

libgpujpeg/gpujpeg_decoder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ gpujpeg_decoder_get_image_info(uint8_t *image, size_t image_size, struct gpujpeg
300300
/// @copydoc GPUJPEG_ENC_OPT_CHANNEL_REMAP
301301
#define GPUJPEG_DEC_OPT_CHANNEL_REMAP "dec_opt_channel_remap"
302302

303-
/// required line padding in bytes
303+
/// required line alignment in bytes
304304
#define GPUJPEG_DEC_OPT_ALIGNMENT_BYTES_INT "dec_opt_alignment_bytes"
305305

306306
/**

src/gpujpeg_exif.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @file
3-
* Copyright (c) 2025 CESNET, zájmové sdružení právnických osob
3+
* Copyright (c) 2025-2026 CESNET, zájmové sdružení právnických osob
44
*
55
* All rights reserved.
66
*
@@ -295,6 +295,7 @@ gpujpeg_write_ifd(struct gpujpeg_writer* writer, const uint8_t* start, size_t co
295295
value.uvalue = (uint32_t[]) {end - start};
296296
}
297297
const struct exif_tiff_tag_info_t* t = &exif_tiff_tag_info[info->tag];
298+
(void) last_tag_id; // suppress unused if assert not used
298299
assert(t->id >= last_tag_id);
299300
last_tag_id = t->id;
300301
write_exif_tag(writer, t->type, t->id, exif_tiff_tag_info[info->tag].count, value, start, &end);
@@ -728,6 +729,7 @@ gpujpeg_exif_parse(uint8_t** image, const uint8_t* image_end, int verbose, struc
728729
for (int i = 0; i < 5; ++i) {
729730
exif[i] = read_byte(image);
730731
}
732+
(void) exif; // suppress unused if assert not used
731733
assert(strncmp((char *) exif, "Exif", sizeof exif) == 0); // otherwise fn shouldn't be called
732734
read_byte(image); // drop (padding)
733735

src/utils/stb_image.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4928,6 +4928,11 @@ static int stbi__compute_transparency(stbi__png *z, stbi_uc tc[3], int out_n)
49284928
return 1;
49294929
}
49304930

4931+
#if defined __GNUC__ && !defined __clang__
4932+
#pragma GCC diagnostic push
4933+
// won't be used by GPUJPEG anyways
4934+
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
4935+
#endif
49314936
static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int out_n)
49324937
{
49334938
stbi__context *s = z->s;
@@ -4952,6 +4957,9 @@ static int stbi__compute_transparency16(stbi__png *z, stbi__uint16 tc[3], int ou
49524957
}
49534958
return 1;
49544959
}
4960+
#if defined __GNUC__ && !defined __clang__
4961+
#pragma GCC diagnostic pop
4962+
#endif
49554963

49564964
static int stbi__expand_png_palette(stbi__png *a, stbi_uc *palette, int len, int pal_img_n)
49574965
{

0 commit comments

Comments
 (0)