diff --git a/Makefile.in b/Makefile.in index ba70240b..66facbe6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -192,8 +192,8 @@ CTAGS = ctags CSCOPE = cscope am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(srcdir)/libsixel.pc.in $(srcdir)/package.json.in.in \ - ChangeLog NEWS compile config.guess config.sub depcomp \ - install-sh ltmain.sh missing py-compile + ChangeLog NEWS compile config.guess config.sub install-sh \ + ltmain.sh missing py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) diff --git a/config.h.in b/config.h.in index 094ea297..6514d2f5 100644 --- a/config.h.in +++ b/config.h.in @@ -87,7 +87,7 @@ /* define 1 if GCC supports -Wsign-conversion */ #undef HAVE_DIAGNOSTIC_SIGN_CONVERSION -/* define 1 if GCC supports -Wstrict-overeflow */ +/* define 1 if GCC supports -Wstrict-overeflow=1 */ #undef HAVE_DIAGNOSTIC_STRICT_OVERFLOW /* define 1 if GCC supports -Wswitch-default */ diff --git a/configure b/configure index 2e205092..4145dd03 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for sixel 1.8.0. +# Generated by GNU Autoconf 2.69 for sixel 1.8.1. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='sixel' PACKAGE_TARNAME='sixel' -PACKAGE_VERSION='1.8.0' -PACKAGE_STRING='sixel 1.8.0' +PACKAGE_VERSION='1.8.1' +PACKAGE_STRING='sixel 1.8.1' PACKAGE_BUGREPORT='saitoha@me.com' PACKAGE_URL='' @@ -1393,7 +1393,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures sixel 1.8.0 to adapt to many kinds of systems. +\`configure' configures sixel 1.8.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1463,7 +1463,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of sixel 1.8.0:";; + short | recursive ) echo "Configuration of sixel 1.8.1:";; esac cat <<\_ACEOF @@ -1612,7 +1612,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -sixel configure 1.8.0 +sixel configure 1.8.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2027,7 +2027,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by sixel $as_me 1.8.0, which was +It was created by sixel $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2970,7 +2970,7 @@ fi # Define the identity of the package. PACKAGE='sixel' - VERSION='1.8.0' + VERSION='1.8.1' cat >>confdefs.h <<_ACEOF @@ -16373,7 +16373,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by sixel $as_me 1.8.0, which was +This file was extended by sixel $as_me 1.8.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -16439,7 +16439,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -sixel config.status 1.8.0 +sixel config.status 1.8.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d5d130dc..453f1309 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,7 @@ AC_PREREQ([2.60]) LT_PREREQ([2.4]) -AC_INIT([sixel], [1.8.0], [saitoha@me.com]) +AC_INIT([sixel], [1.8.1], [saitoha@me.com]) LS_LT_CURRENT=1 LS_LT_REVISION=6 LS_LT_AGE=0 diff --git a/package.json b/package.json index f7c305ee..4629d40a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "libsixel", - "version": "1.8.0", + "version": "1.8.1", "repo": "saitoha/libsixel", "description": "A lightweight, fast implementation of DEC SIXEL graphics codec", "keywords": ["terminal", "graphics", "image", "sixel"], diff --git a/src/chunk.c b/src/chunk.c index 45936d48..0a72f473 100644 --- a/src/chunk.c +++ b/src/chunk.c @@ -161,27 +161,22 @@ memory_write(void /* in */ *ptr, # endif +#if HAVE_DIAGNOSTIC_SIGN_CONVERSION +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wsign-conversion" +#endif static int wait_file(int fd, int usec) { + int ret = 1; #if HAVE_SYS_SELECT_H fd_set rfds; struct timeval tv; -#endif /* HAVE_SYS_SELECT_H */ - int ret = 1; -#if HAVE_SYS_SELECT_H tv.tv_sec = usec / 1000000; tv.tv_usec = usec % 1000000; FD_ZERO(&rfds); -#if HAVE_DIAGNOSTIC_SIGN_CONVERSION -# pragma GCC diagnostic push -# pragma GCC diagnostic ignored "-Wsign-conversion" -#endif FD_SET(fd, &rfds); -#if HAVE_DIAGNOSTIC_SIGN_CONVERSION -# pragma GCC diagnostic pop -#endif ret = select(fd + 1, &rfds, NULL, NULL, &tv); #else (void) fd; @@ -196,6 +191,9 @@ wait_file(int fd, int usec) return (0); } +#if HAVE_DIAGNOSTIC_SIGN_CONVERSION +# pragma GCC diagnostic pop +#endif static SIXELSTATUS @@ -260,12 +258,12 @@ sixel_chunk_from_file( { SIXELSTATUS status = SIXEL_FALSE; int ret; - FILE *f; + FILE *f = NULL; size_t n; size_t const bucket_size = 4096; status = open_binary_file(&f, filename); - if (SIXEL_FAILED(status)) { + if (SIXEL_FAILED(status) || f == NULL) { goto end; } diff --git a/src/quant.c b/src/quant.c index e100d675..827fe48a 100644 --- a/src/quant.c +++ b/src/quant.c @@ -1280,27 +1280,21 @@ sixel_quant_apply_palette( switch (methodForDiffuse) { case SIXEL_DIFFUSE_NONE: f_diffuse = diffuse_none; - f_mask = mask_a; break; case SIXEL_DIFFUSE_ATKINSON: f_diffuse = diffuse_atkinson; - f_mask = mask_a; break; case SIXEL_DIFFUSE_FS: f_diffuse = diffuse_fs; - f_mask = mask_a; break; case SIXEL_DIFFUSE_JAJUNI: f_diffuse = diffuse_jajuni; - f_mask = mask_a; break; case SIXEL_DIFFUSE_STUCKI: f_diffuse = diffuse_stucki; - f_mask = mask_a; break; case SIXEL_DIFFUSE_BURKES: f_diffuse = diffuse_burkes; - f_mask = mask_a; break; case SIXEL_DIFFUSE_A_DITHER: f_diffuse = diffuse_none; @@ -1315,7 +1309,6 @@ sixel_quant_apply_palette( " methodForDiffuse: %d\n", methodForDiffuse); f_diffuse = diffuse_none; - f_mask = mask_a; break; } }