Hello community,

here is the log from the commit of package libaec for openSUSE:Factory checked 
in at 2017-10-26 18:42:17
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libaec (Old)
 and      /work/SRC/openSUSE:Factory/.libaec.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libaec"

Thu Oct 26 18:42:17 2017 rev:3 rq:536432 version:1.0.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/libaec/libaec.changes    2017-10-07 
17:47:44.195029335 +0200
+++ /work/SRC/openSUSE:Factory/.libaec.new/libaec.changes       2017-10-26 
18:42:19.345723995 +0200
@@ -1,0 +2,6 @@
+Tue Oct 24 16:29:44 UTC 2017 - [email protected]
+
+- version bump to v1.0.2
+  * C99 requirement in all build systems
+
+-------------------------------------------------------------------

Old:
----
  libaec-1.0.1.tar.gz

New:
----
  libaec-1.0.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libaec.spec ++++++
--- /var/tmp/diff_new_pack.UYUyq8/_old  2017-10-26 18:42:20.001693386 +0200
+++ /var/tmp/diff_new_pack.UYUyq8/_new  2017-10-26 18:42:20.001693386 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           libaec
-Version:        1.0.1
+Version:        1.0.2
 Release:        0
 Summary:        Adaptive Entropy Coding library
 #---License is BSD, however there is a non-enforced NASA patent on the
@@ -94,8 +94,7 @@
 
 %build
 %if 0%{?is_opensuse} == 1 && 0%{?suse_version} > 1310
-%cmake -DCMAKE_C_FLAGS="%{optflags} -std=gnu99"
-make %{?_smp_mflags}
+%cmake
 %else
 libtoolize --force
 aclocal
@@ -103,8 +102,8 @@
 automake --force-missing --add-missing
 autoconf
 %configure --disable-static
-make %{?_smp_mflags} CFLAGS="%{optflags} -std=gnu99"
 %endif
+make %{?_smp_mflags}
 
 %check
 #test data missing in tarball for check_szcomp and sampledata.sh
@@ -112,7 +111,7 @@
 LD_LIBRARY_PATH=%{buildroot}/%{_libdir} \
   make -C build test ARGS="-E \(check_szcomp\|sampledata.sh\)"
 %else
-make -i %{?_smp_mflags} CFLAGS="%{optflags} -std=gnu99" check VERBOSE=1
+make -i %{?_smp_mflags} check VERBOSE=1
 %endif
 
 %install

++++++ libaec-1.0.1.tar.gz -> libaec-1.0.2.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/CHANGELOG.md 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/CHANGELOG.md
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/CHANGELOG.md     
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/CHANGELOG.md     
2017-10-18 11:54:49.000000000 +0200
@@ -1,6 +1,11 @@
 # libaec Changelog
 All notable changes to libaec will be documented in this file.
 
+## [1.0.2] - 2017-10-18
+
+### Fixed
+- C99 requirement in all build systems
+
 ## [1.0.1] - 2017-07-14
 
 ### Fixed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/CMakeLists.txt 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/CMakeLists.txt
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/CMakeLists.txt   
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/CMakeLists.txt   
2017-10-18 11:54:49.000000000 +0200
@@ -1,12 +1,14 @@
-cmake_minimum_required(VERSION 3.0.0)
+cmake_minimum_required(VERSION 3.1)
+set(CMAKE_C_STANDARD 99)
 include(CheckIncludeFiles)
 include(TestBigEndian)
 include(CheckCSourceCompiles)
+include(CheckSymbolExists)
 include(cmake/macros.cmake)
 project(libaec)
 set(libaec_VERSION_MAJOR 1)
 set(libaec_VERSION_MINOR 0)
-set(libaec_VERSION_PATCH 1)
+set(libaec_VERSION_PATCH 2)
 set(CMAKE_BUILD_TYPE Release)
 enable_testing()
 
@@ -20,6 +22,12 @@
 find_inline_keyword()
 find_restrict_keyword()
 
+check_symbol_exists(snprintf "stdio.h" HAVE_SNPRINTF)
+if(NOT HAVE_SNPRINTF)
+  check_symbol_exists(_snprintf "stdio.h" HAVE__SNPRINTF)
+  check_symbol_exists(_snprintf_s "stdio.h" HAVE__SNPRINTF_S)
+endif(NOT HAVE_SNPRINTF)
+
 configure_file(
   ${CMAKE_CURRENT_SOURCE_DIR}/cmake/config.h.in
   ${CMAKE_CURRENT_BINARY_DIR}/config.h)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/Makefile.am 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/Makefile.am
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/Makefile.am      
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/Makefile.am      
2017-10-18 11:54:49.000000000 +0200
@@ -1,8 +1,5 @@
 ACLOCAL_AMFLAGS = -I m4
-if AEC_FUZZING
-  FUZZDIR = fuzzing
-endif
-SUBDIRS = src tests $(FUZZDIR)
+SUBDIRS = src tests
 EXTRA_DIST = doc/patent.txt CMakeLists.txt cmake/config.h.in \
 cmake/macros.cmake README.md README.SZIP CHANGELOG.md Copyright.txt data
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/cmake/config.h.in 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/cmake/config.h.in
--- 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/cmake/config.h.in    
    2017-07-17 11:47:18.000000000 +0200
+++ 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/cmake/config.h.in    
    2017-10-18 11:54:49.000000000 +0200
@@ -3,3 +3,6 @@
 #cmakedefine WORDS_BIGENDIAN 1
 #cmakedefine HAVE_DECL___BUILTIN_CLZLL 1
 #cmakedefine HAVE_BSR64 1
+#cmakedefine HAVE_SNPRINTF 1
+#cmakedefine HAVE__SNPRINTF 1
+#cmakedefine HAVE__SNPRINTF_S 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/configure.ac 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/configure.ac
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/configure.ac     
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/configure.ac     
2017-10-18 11:54:49.000000000 +0200
@@ -1,5 +1,5 @@
 AC_PREREQ([2.64])
-AC_INIT([libaec], [1.0.1], [[email protected]])
+AC_INIT([libaec], [1.0.2], [[email protected]])
 
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([config])
@@ -11,8 +11,7 @@
 AM_INIT_AUTOMAKE([foreign])
 AM_MAINTAINER_MODE([enable])
 
-AC_PROG_CC
-AC_PROG_CXX
+AC_PROG_CC_C99
 
 AC_HEADER_STDC
 
@@ -26,28 +25,10 @@
 AC_C_INLINE
 AC_C_RESTRICT
 
-AC_CHECK_FUNCS([memset strstr])
+AC_CHECK_FUNCS([memset strstr snprintf])
 AC_CHECK_DECLS(__builtin_clzll)
 
 AM_EXTRA_RECURSIVE_TARGETS([bench benc bdec])
 
-AC_ARG_ENABLE([fuzzing],
-  AS_HELP_STRING([--enable-fuzzing], [Enable fuzzing of libaec]))
-
-AS_IF([test "x$enable_fuzzing" = "xyes"], [
-  AX_COMPILER_VENDOR
-  AS_IF([test "x$ax_cv_c_compiler_vendor" = "xclang"], [
-    AC_LANG_PUSH([C++])
-    AX_COMPILER_VENDOR
-    AC_LANG_POP([C++])
-    AS_IF([test "x$ax_cv_cxx_compiler_vendor" = "xclang"], [], [
-      AC_MSG_ERROR([You need to build with Clang as CXX for fuzzing to work])
-    ])
-  ], [
-    AC_MSG_ERROR([You need to build with Clang as CC for fuzzing to work])
-  ])
-])
-AM_CONDITIONAL([AEC_FUZZING], [test x$enable_fuzzing = xyes])
-
-AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile fuzzing/Makefile])
+AC_CONFIG_FILES([Makefile src/Makefile tests/Makefile])
 AC_OUTPUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/fuzzing/Makefile.am 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/fuzzing/Makefile.am
--- 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/fuzzing/Makefile.am  
    2017-07-17 11:47:18.000000000 +0200
+++ 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/fuzzing/Makefile.am  
    1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-FUZZING_FLAGS = -g -fsanitize=address \
--fsanitize-coverage=trace-pc-guard,indirect-calls,edge
-noinst_LIBRARIES = libaec_fuzz.a
-libaec_fuzz_a_SOURCES = $(top_srcdir)/src/encode.c \
-$(top_srcdir)/src/encode_accessors.c \
-$(top_srcdir)/src/decode.c \
-$(top_srcdir)/src/encode.h \
-$(top_srcdir)/src/encode_accessors.h \
-$(top_srcdir)/src/decode.h
-libaec_fuzz_a_CFLAGS = $(FUZZING_FLAGS)
-aec_fuzz_SOURCES = fuzz_target.cc
-aec_fuzz_CXXFLAGS = $(FUZZING_FLAGS)
-aec_fuzz_LDFLAGS = -fsanitize=address -lFuzzer
-aec_fuzz_LDADD = libaec_fuzz.a
-noinst_PROGRAMS = aec_fuzz
-EXTRA_DIST = CMakeLists.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/m4/m4_ax_compiler_vendor.m4
 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/m4/m4_ax_compiler_vendor.m4
--- 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/m4/m4_ax_compiler_vendor.m4
      2017-07-17 11:47:18.000000000 +0200
+++ 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/m4/m4_ax_compiler_vendor.m4
      1970-01-01 01:00:00.000000000 +0100
@@ -1,87 +0,0 @@
-# ===========================================================================
-#    https://www.gnu.org/software/autoconf-archive/ax_compiler_vendor.html
-# ===========================================================================
-#
-# SYNOPSIS
-#
-#   AX_COMPILER_VENDOR
-#
-# DESCRIPTION
-#
-#   Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
-#   hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
-#   watcom, etc. The vendor is returned in the cache variable
-#   $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
-#
-# LICENSE
-#
-#   Copyright (c) 2008 Steven G. Johnson <[email protected]>
-#   Copyright (c) 2008 Matteo Frigo
-#
-#   This program is free software: you can redistribute it and/or modify it
-#   under the terms of the GNU General Public License as published by the
-#   Free Software Foundation, either version 3 of the License, or (at your
-#   option) any later version.
-#
-#   This program is distributed in the hope that it will be useful, but
-#   WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
-#   Public License for more details.
-#
-#   You should have received a copy of the GNU General Public License along
-#   with this program. If not, see <https://www.gnu.org/licenses/>.
-#
-#   As a special exception, the respective Autoconf Macro's copyright owner
-#   gives unlimited permission to copy, distribute and modify the configure
-#   scripts that are the output of Autoconf when processing the Macro. You
-#   need not follow the terms of the GNU General Public License when using
-#   or distributing such scripts, even though portions of the text of the
-#   Macro appear in them. The GNU General Public License (GPL) does govern
-#   all other use of the material that constitutes the Autoconf Macro.
-#
-#   This special exception to the GPL applies to versions of the Autoconf
-#   Macro released by the Autoconf Archive. When you make and distribute a
-#   modified version of the Autoconf Macro, you may extend this special
-#   exception to the GPL to apply to your modified version as well.
-
-#serial 16
-
-AC_DEFUN([AX_COMPILER_VENDOR],
-[AC_CACHE_CHECK([for _AC_LANG compiler vendor], 
ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
-  dnl Please add if possible support to ax_compiler_version.m4
-  [# note: don't check for gcc first since some other compilers define __GNUC__
-  vendors="intel:     __ICC,__ECC,__INTEL_COMPILER
-           ibm:       __xlc__,__xlC__,__IBMC__,__IBMCPP__
-           pathscale: __PATHCC__,__PATHSCALE__
-           clang:     __clang__
-           cray:      _CRAYC
-           fujitsu:   __FUJITSU
-           gnu:       __GNUC__
-           sun:       __SUNPRO_C,__SUNPRO_CC
-           hp:        __HP_cc,__HP_aCC
-           dec:       __DECC,__DECCXX,__DECC_VER,__DECCXX_VER
-           borland:   __BORLANDC__,__CODEGEARC__,__TURBOC__
-           comeau:    __COMO__
-           kai:       __KCC
-           lcc:       __LCC__
-           sgi:       __sgi,sgi
-           microsoft: _MSC_VER
-           metrowerks: __MWERKS__
-           watcom:    __WATCOMC__
-           portland:  __PGI
-          tcc:       __TINYC__
-           unknown:   UNKNOWN"
-  for ventest in $vendors; do
-    case $ventest in
-      *:) vendor=$ventest; continue ;;
-      *)  vencpp="defined("`echo $ventest | sed 's/,/) || defined(/g'`")" ;;
-    esac
-    AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
-      #if !($vencpp)
-        thisisanerror;
-      #endif
-    ])], [break])
-  done
-  ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=`echo $vendor | cut -d: -f1`
- ])
-])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/CMakeLists.txt 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/CMakeLists.txt
--- 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/CMakeLists.txt   
    2017-07-17 11:47:18.000000000 +0200
+++ 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/CMakeLists.txt   
    2017-10-18 11:54:49.000000000 +0200
@@ -1,5 +1,5 @@
 add_library(aec ${LIB_TYPE} ${libaec_SRCS})
-set_target_properties(aec PROPERTIES VERSION 0.0.7 SOVERSION 0)
+set_target_properties(aec PROPERTIES VERSION 0.0.8 SOVERSION 0)
 add_library(sz ${LIB_TYPE} sz_compat.c)
 set_target_properties(sz PROPERTIES VERSION 2.0.1 SOVERSION 2)
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/Makefile.am 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/Makefile.am
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/Makefile.am  
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/Makefile.am  
2017-10-18 11:54:49.000000000 +0200
@@ -3,7 +3,7 @@
 lib_LTLIBRARIES = libaec.la libsz.la
 libaec_la_SOURCES = encode.c encode_accessors.c decode.c \
 encode.h encode_accessors.h decode.h
-libaec_la_LDFLAGS = -version-info 0:7:0 -no-undefined
+libaec_la_LDFLAGS = -version-info 0:8:0 -no-undefined
 
 libsz_la_SOURCES = sz_compat.c
 libsz_la_LIBADD = libaec.la
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/bdec.sh 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/bdec.sh
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/bdec.sh      
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/bdec.sh      
2017-10-18 11:54:49.000000000 +0200
@@ -7,7 +7,7 @@
 rm -f dec.dat
 bsize=$(wc -c bench.dat | awk '{print $1}')
 utime=$(./utime ./aec -d -n16 -j64 -r256 -m bench.rz dec.dat 2>&1)
-perf=$(echo "$bsize/1048576/$utime" | bc)
+perf=$(awk "BEGIN {print ${bsize}/1048576/${utime}}")
 echo "*** Decoding with $perf MiB/s user time ***"
 cmp bench.dat dec.dat
 rm -f dec.dat
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/benc.sh 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/benc.sh
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/benc.sh      
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/benc.sh      
2017-10-18 11:54:49.000000000 +0200
@@ -13,6 +13,7 @@
 fi
 rm -f bench.rz
 utime=$(./utime $AEC -n16 -j64 -r256 -m bench.dat bench.rz 2>&1)
+echo $utime
 bsize=$(wc -c bench.dat | awk '{print $1}')
-perf=$(echo "$bsize/1048576/$utime" | bc)
+perf=$(awk "BEGIN {print ${bsize}/1048576/${utime}}")
 echo "*** Encoding with $perf MiB/s user time ***"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/decode.c 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/decode.c
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/decode.c     
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/decode.c     
2017-10-18 11:54:49.000000000 +0200
@@ -94,10 +94,11 @@
                 xmax = state->xmax;                                      \
                                                                          \
                 for (bp = state->flush_start; bp < flush_end; bp++) {    \
+                    uint32_t mask;                                       \
                     d = *bp;                                             \
                     half_d = (d >> 1) + (d & 1);                         \
                     /*in this case: data >= med == data & med */         \
-                    uint32_t mask = (data & med)?xmax:0;                 \
+                    mask = (data & med)?xmax:0;                          \
                                                                          \
                     /*in this case: xmax - data == xmax ^ data */        \
                     if (half_d <= (mask ^ (uint32_t)data)) {             \
@@ -303,21 +304,23 @@
         state->bitp = 56;
     }
 
+    {
 #ifndef __has_builtin
 #define __has_builtin(x) 0  /* Compatibility with non-clang compilers. */
 #endif
 #if HAVE_DECL___BUILTIN_CLZLL || __has_builtin(__builtin_clzll)
-    int i = 63 - __builtin_clzll(state->acc);
+        int i = 63 - __builtin_clzll(state->acc);
 #elif HAVE_BSR64
-    unsigned long i;
-    _BitScanReverse64(&i, state->acc);
+        unsigned long i;
+        _BitScanReverse64(&i, state->acc);
 #else
-    int i = state->bitp - 1;
-    while ((state->acc & (UINT64_C(1) << i)) == 0)
-        i--;
+        int i = state->bitp - 1;
+        while ((state->acc & (UINT64_C(1) << i)) == 0)
+            i--;
 #endif
-    fs += state->bitp - i - 1;
-    state->bitp = i;
+        fs += state->bitp - i - 1;
+        state->bitp = i;
+    }
     return fs;
 }
 
@@ -676,6 +679,7 @@
 int aec_decode_init(struct aec_stream *strm)
 {
     struct internal_state *state;
+    int modi;
 
     if (strm->bits_per_sample > 32 || strm->bits_per_sample == 0)
         return AEC_CONF_ERROR;
@@ -745,7 +749,7 @@
     state->in_blklen = (strm->block_size * strm->bits_per_sample
                         + state->id_len) / 8 + 16;
 
-    int modi = 1UL << state->id_len;
+    modi = 1UL << state->id_len;
     state->id_table = malloc(modi * sizeof(int (*)(struct aec_stream *)));
     if (state->id_table == NULL)
         return AEC_MEM_ERROR;
@@ -791,11 +795,12 @@
        of the states are called. Inspired by zlib.
     */
 
+    struct internal_state *state = strm->state;
+    int status;
+
     strm->total_in += strm->avail_in;
     strm->total_out += strm->avail_out;
 
-    struct internal_state *state = strm->state;
-    int status;
     do {
         status = state->mode(strm);
     } while (status == M_CONTINUE);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/encode.c 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/encode.c
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/encode.c     
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/encode.c     
2017-10-18 11:54:49.000000000 +0200
@@ -580,11 +580,12 @@
     struct internal_state *state = strm->state;
 
     uint32_t split_len;
+    uint32_t se_len;
     if (state->id_len > 1)
         split_len = assess_splitting_option(strm);
     else
         split_len = UINT32_MAX;
-    uint32_t se_len = assess_se_option(strm);
+    se_len = assess_se_option(strm);
 
     if (split_len < state->uncomp_len) {
         if (split_len < se_len)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/sz_compat.c 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/sz_compat.c
--- old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/src/sz_compat.c  
2017-07-17 11:47:18.000000000 +0200
+++ new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/src/sz_compat.c  
2017-10-18 11:54:49.000000000 +0200
@@ -99,7 +99,15 @@
                           SZ_com_t *param)
 {
     struct aec_stream strm;
+    void *buf = 0;
+    void *padbuf = 0;
     int status;
+    int interleave;
+    int pixel_size;
+    int aec_status;
+    size_t scanlines;
+    size_t padbuf_size;
+    size_t padding_size;
 
     strm.block_size = param->pixels_per_block;
     strm.rsi = (param->pixels_per_scanline + param->pixels_per_block - 1)
@@ -107,10 +115,8 @@
     strm.flags = AEC_NOT_ENFORCE | convert_options(param->options_mask);
     strm.avail_out = *destLen;
     strm.next_out = dest;
-    void *buf = 0;
-    void *padbuf = 0;
 
-    int interleave = param->bits_per_pixel == 32 || param->bits_per_pixel == 
64;
+    interleave = param->bits_per_pixel == 32 || param->bits_per_pixel == 64;
     if (interleave) {
         strm.bits_per_sample = 8;
         buf = malloc(sourceLen);
@@ -124,18 +130,18 @@
         buf = (void *)source;
     }
 
-    int pixel_size = bits_to_bytes(strm.bits_per_sample);
+    pixel_size = bits_to_bytes(strm.bits_per_sample);
 
-    size_t scanlines = (sourceLen / pixel_size + param->pixels_per_scanline - 
1)
+    scanlines = (sourceLen / pixel_size + param->pixels_per_scanline - 1)
         / param->pixels_per_scanline;
-    size_t padbuf_size = strm.rsi * strm.block_size * pixel_size * scanlines;
+    padbuf_size = strm.rsi * strm.block_size * pixel_size * scanlines;
     padbuf = malloc(padbuf_size);
     if (padbuf == NULL) {
         status = SZ_MEM_ERROR;
         goto CLEANUP;
     }
 
-    size_t padding_size =
+    padding_size =
         (strm.rsi * strm.block_size - param->pixels_per_scanline)
         * pixel_size;
 
@@ -146,7 +152,7 @@
     strm.next_in = padbuf;
     strm.avail_in = padbuf_size;
 
-    int aec_status = aec_buffer_encode(&strm);
+    aec_status = aec_buffer_encode(&strm);
     if (aec_status == AEC_STREAM_ERROR)
         status = SZ_OUTBUFF_FULL;
     else
@@ -166,7 +172,12 @@
                             SZ_com_t *param)
 {
     struct aec_stream strm;
+    void *buf = 0;
     int status;
+    int pad_scanline;
+    int deinterleave;
+    int extra_buffer;
+    int pixel_size;
     size_t total_out;
     size_t scanlines;
 
@@ -176,13 +187,11 @@
     strm.flags = convert_options(param->options_mask);
     strm.avail_in = sourceLen;
     strm.next_in = source;
-    void *buf = 0;
 
-    int pad_scanline = param->pixels_per_scanline % param->pixels_per_block;
-    int deinterleave = (param->bits_per_pixel == 32
+    pad_scanline = param->pixels_per_scanline % param->pixels_per_block;
+    deinterleave = (param->bits_per_pixel == 32
                         || param->bits_per_pixel == 64);
-    int extra_buffer = pad_scanline || deinterleave;
-    int pixel_size;
+    extra_buffer = pad_scanline || deinterleave;
 
     if (deinterleave)
         strm.bits_per_sample = 8;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/tests/check_aec.h 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/tests/check_aec.h
--- 
old/libaec-v1.0.1-d808db1e1276f6c23feccdcefd56f7e38e2d7c9e/tests/check_aec.h    
    2017-07-17 11:47:18.000000000 +0200
+++ 
new/libaec-v1.0.2-b428510436e86c34908e3cb00a6b2e62aa1390da/tests/check_aec.h    
    2017-10-18 11:54:49.000000000 +0200
@@ -1,5 +1,7 @@
 #ifndef CHECK_AEC_H
 #define CHECK_AEC_H 1
+
+#include <config.h>
 #include "libaec.h"
 
 struct test_state {
@@ -24,6 +26,18 @@
 int encode_decode_small(struct test_state *state);
 int encode_decode_large(struct test_state *state);
 
+#ifndef HAVE_SNPRINTF
+#ifdef HAVE__SNPRINTF_S
+#define snprintf(d, n, ...) _snprintf_s((d), (n), _TRUNCATE, __VA_ARGS__)
+#else
+#ifdef HAVE__SNPRINTF
+#define snprintf _snprintf
+#else
+#error "no snprintf compatible function found"
+#endif /* HAVE__SNPRINTF */
+#endif /* HAVE__SNPRINTF_S */
+#endif /* HAVE_SNPRINTF */
+
 #ifdef _WIN32
 #define CHECK_PASS "PASS"
 #define CHECK_FAIL "FAIL"


Reply via email to