slackbuilds_ponce/graphics/imv/squelch_libtiff_warnings.diff
B. Watson 1e651dc4b6
graphics/imv: Added (image viewer for X and/or Wayland)
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>

Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2020-11-29 01:02:55 +07:00

44 lines
1.3 KiB
Diff

diff -Naur imv-4.1.0/src/backend_libtiff.c imv-4.1.0.patched/src/backend_libtiff.c
--- imv-4.1.0/src/backend_libtiff.c 2019-12-21 17:54:26.000000000 -0500
+++ imv-4.1.0.patched/src/backend_libtiff.c 2020-11-21 16:40:37.971589947 -0500
@@ -110,6 +110,7 @@
{
struct private private;
+ TIFFSetErrorHandler(NULL);
private.tiff = TIFFOpen(path, "r");
if (!private.tiff) {
/* Header is read, so no BAD_PATH check here */
@@ -129,6 +130,7 @@
static enum backend_result open_memory(void *data, size_t len, struct imv_source **src)
{
struct private *private = malloc(sizeof *private);
+ TIFFSetErrorHandler(NULL);
private->data = data;
private->len = len;
private->pos = 0;
diff -Naur imv-4.1.0/src/main.c imv-4.1.0.patched/src/main.c
--- imv-4.1.0/src/main.c 2019-12-21 17:54:26.000000000 -0500
+++ imv-4.1.0.patched/src/main.c 2020-11-21 16:40:46.483589173 -0500
@@ -17,10 +17,6 @@
return 1;
}
-#ifdef IMV_BACKEND_LIBTIFF
- imv_install_backend(imv, &imv_backend_libtiff);
-#endif
-
#ifdef IMV_BACKEND_LIBPNG
imv_install_backend(imv, &imv_backend_libpng);
#endif
@@ -41,6 +37,10 @@
imv_install_backend(imv, &imv_backend_freeimage);
#endif
+#ifdef IMV_BACKEND_LIBTIFF
+ imv_install_backend(imv, &imv_backend_libtiff);
+#endif
+
if (!imv_load_config(imv)) {
imv_free(imv);
return 1;