Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libdmtx for openSUSE:Factory checked 
in at 2022-07-31 23:00:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libdmtx (Old)
 and      /work/SRC/openSUSE:Factory/.libdmtx.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libdmtx"

Sun Jul 31 23:00:18 2022 rev:14 rq:989795 version:0.7.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/libdmtx/libdmtx.changes  2019-09-09 
12:29:24.413632664 +0200
+++ /work/SRC/openSUSE:Factory/.libdmtx.new.1533/libdmtx.changes        
2022-07-31 23:00:27.683607617 +0200
@@ -1,0 +2,13 @@
+Fri Jul 15 19:08:00 UTC 2022 - Dirk M??ller <dmuel...@suse.com>
+
+- update to 0.7.7:
+  * bug 9: Prevent edifact barcode encoding '31' from user input 
+  * fix compiler warnings and build errors
+  * properly handle error when decoding Base256 scheme 
+  * remove dead and irrelevant links in the README
+  * Add validity checks in DecodeSchemeAscii() 
+  * Declare variables in DecodeSchemeAscii() locally.
+  * Implement RsFindErrorLocatorPoly fix from shm0nya
+-  drop libdmtx-DmtxPropRowPadBytes.patch (upstream)#
+
+-------------------------------------------------------------------

Old:
----
  libdmtx-0.7.5.tar.gz
  libdmtx-DmtxPropRowPadBytes.patch

New:
----
  libdmtx-0.7.7.tar.gz

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

Other differences:
------------------
++++++ libdmtx.spec ++++++
--- /var/tmp/diff_new_pack.Np8zBY/_old  2022-07-31 23:00:28.171609035 +0200
+++ /var/tmp/diff_new_pack.Np8zBY/_new  2022-07-31 23:00:28.175609046 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package libdmtx
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,17 +17,15 @@
 
 
 Name:           libdmtx
-Version:        0.7.5
+Version:        0.7.7
 Release:        0
 Summary:        Software for reading and writing Data Matrix barcodes
 License:        BSD-2-Clause
 Group:          Development/Libraries/C and C++
-URL:            http://libdmtx.sourceforge.net/
+URL:            https://github.com/dmtx/libdmtx
 Source:         
https://github.com/dmtx/%{name}/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz
 Source1:        baselibs.conf
 Patch0:         libdmtx-0.7.4.diff
-# PATCH-FIX-UPSTREAM libdmtx-DmtxPropRowPadBytes.patch
-Patch1:         libdmtx-DmtxPropRowPadBytes.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  libtool
@@ -63,7 +61,7 @@
 
 %build
 %configure --disable-static
-make %{?_smp_mflags}
+%make_build
 
 %install
 %make_install

++++++ libdmtx-0.7.5.tar.gz -> libdmtx-0.7.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/.gitignore new/libdmtx-0.7.7/.gitignore
--- old/libdmtx-0.7.5/.gitignore        1970-01-01 01:00:00.000000000 +0100
+++ new/libdmtx-0.7.7/.gitignore        2022-04-25 20:50:47.000000000 +0200
@@ -0,0 +1 @@
+build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/CMakeLists.txt 
new/libdmtx-0.7.7/CMakeLists.txt
--- old/libdmtx-0.7.5/CMakeLists.txt    1970-01-01 01:00:00.000000000 +0100
+++ new/libdmtx-0.7.7/CMakeLists.txt    2022-04-25 20:50:47.000000000 +0200
@@ -0,0 +1,28 @@
+cmake_minimum_required(VERSION 3.0)
+project(DMTX VERSION 0.7.5 LANGUAGES C)
+
+# DMTX library
+option(DMTX_SHARED "Build DMTX as shared library" ${BUILD_SHARED_LIBS})
+if(DMTX_SHARED)
+  add_library(dmtx SHARED "dmtx.c")
+else()
+  add_library(dmtx STATIC "dmtx.c")
+endif()
+
+# Compiler specific settings
+if (MSVC)
+  set_target_properties(dmtx PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS ON)
+else()
+  set_target_properties(dmtx PROPERTIES
+                                VERSION ${PROJECT_VERSION}
+                                SOVERSION ${PROJECT_VERSION_MAJOR})
+  target_link_libraries(dmtx PUBLIC -lm)
+endif()
+
+# Add tests if DMTX is the main project
+if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
+    include(CTest)
+    if(BUILD_TESTING)
+      add_subdirectory("test")
+    endif()
+endif()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/README new/libdmtx-0.7.7/README
--- old/libdmtx-0.7.5/README    2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/README    2022-04-25 20:50:47.000000000 +0200
@@ -117,12 +117,10 @@
 5. Contact
 -----------------------------------------------------------------
 
-Project website:       www.libdmtx.org
 Documentation wiki:    libdmtx.wikidot.com
-SourceForge.net page:  www.sourceforge.net/projects/libdmtx
+GitHub page:           github.com/dmtx/libdmtx
 OhLoh.net page:        www.ohloh.net/projects/libdmtx
 Open mailing list:     libdmtx-open_discuss...@lists.sourceforge.net
-Professional support:  www.dragonflylogic.com/products
 
 
 6. This Document
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/README.linux 
new/libdmtx-0.7.7/README.linux
--- old/libdmtx-0.7.5/README.linux      2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/README.linux      2022-04-25 20:50:47.000000000 +0200
@@ -25,9 +25,6 @@
 their package repositories. This can be a real time saver if you
 aren't required to build from source for other reasons.
 
-Go to http://www.dragonflylogic.com/downloads for a list of all
-download options available on your system.
-
 
 3. This Document
 -----------------------------------------------------------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/README.unix 
new/libdmtx-0.7.7/README.unix
--- old/libdmtx-0.7.5/README.unix       2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/README.unix       2022-04-25 20:50:47.000000000 +0200
@@ -29,10 +29,7 @@
    * Solaris
 
 However, building libdmtx from source on these operating systems
-can be tricky due to their non-GNU conventions. Users may wish to
-evaluate the trial binaries available at:
-
-  http://www.dragonflylogic.com/downloads
+can be tricky due to their non-GNU conventions.
 
 
 3. This Document
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/autogen.sh new/libdmtx-0.7.7/autogen.sh
--- old/libdmtx-0.7.5/autogen.sh        2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/autogen.sh        2022-04-25 20:50:47.000000000 +0200
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # Create empty m4 directory if missing
-if [[ ! -d "m4" ]]; then
+if [ ! -d "m4" ]; then
    echo "autogen.sh: creating empty m4 directory"
    mkdir m4
 fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/configure.ac 
new/libdmtx-0.7.7/configure.ac
--- old/libdmtx-0.7.5/configure.ac      2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/configure.ac      2022-04-25 20:50:47.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT([libdmtx], [0.7.5], [m...@dragonflylogic.com])
+AC_INIT([libdmtx], [0.7.7], [https://github.com/dmtx/libdmtx/issues], 
[libdmtx], [https://github.com/dmtx/libdmtx])
 AM_INIT_AUTOMAKE([-Wall -Werror])
 
 AC_CONFIG_MACRO_DIR([m4])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxdecode.c 
new/libdmtx-0.7.7/dmtxdecode.c
--- old/libdmtx-0.7.5/dmtxdecode.c      2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/dmtxdecode.c      2022-04-25 20:50:47.000000000 +0200
@@ -408,7 +408,11 @@
       return NULL;
    }
 
-   DecodeDataStream(msg, sizeIdx, NULL);
+   if(DecodeDataStream(msg, sizeIdx, NULL) == DmtxFail) {
+      dmtxMessageDestroy(&msg);
+      msg = NULL;
+      return NULL;
+   }
 
    return msg;
 }
@@ -516,7 +520,7 @@
    if(pnm == NULL)
       return NULL;
 
-#ifdef _VISUALC_
+#if defined(_MSC_VER) && (_MSC_VER < 1700)
    count = sprintf_s((char *)pnm, *headerBytes + 1, "P6\n%d %d\n255\n", width, 
height);
 #else
    count = snprintf((char *)pnm, *headerBytes + 1, "P6\n%d %d\n255\n", width, 
height);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxdecodescheme.c 
new/libdmtx-0.7.7/dmtxdecodescheme.c
--- old/libdmtx-0.7.5/dmtxdecodescheme.c        2018-03-25 20:32:01.000000000 
+0200
+++ new/libdmtx-0.7.7/dmtxdecodescheme.c        2022-04-25 20:50:47.000000000 
+0200
@@ -21,7 +21,7 @@
  * \param  outputStart
  * \return void
  */
-extern void
+extern DmtxPassFail
 DecodeDataStream(DmtxMessage *msg, int sizeIdx, unsigned char *outputStart)
 {
    //fprintf(stdout, "libdmtx::DecodeDataStream()\n");
@@ -76,11 +76,16 @@
             /* error */
             break;
       }
+
+      if(ptr == NULL)
+         return DmtxFail;
    }
 
    /* Print macro trailer if required */
    if(macro == DmtxTrue)
       PushOutputMacroTrailer(msg);
+
+   return DmtxPass;
 }
 
 /**
@@ -131,6 +136,16 @@
 }
 
 /**
+*
+*
+*/
+static DmtxBoolean
+ValidOutputWord(int value)
+{
+   return (value >= 0 && value < 256) ? DmtxTrue : DmtxFalse;
+}
+
+/**
  *
  *
  */
@@ -191,18 +206,15 @@
  * \param  ptr
  * \param  dataEnd
  * \return Pointer to next undecoded codeword
+ *         NULL if an error was detected in the stream
  */
 static unsigned char *
 DecodeSchemeAscii(DmtxMessage *msg, unsigned char *ptr, unsigned char *dataEnd)
 {
-   int upperShift;
-   int codeword, digits;
-
-   upperShift = DmtxFalse;
+   int upperShift = DmtxFalse;
 
    while(ptr < dataEnd) {
-
-      codeword = (int)(*ptr);
+      int codeword = (int)(*ptr);
 
       if(GetEncodationScheme(*ptr) != DmtxSchemeAscii)
          return ptr;
@@ -210,7 +222,10 @@
          ptr++;
 
       if(upperShift == DmtxTrue) {
-         PushOutputWord(msg, codeword + 127);
+         int pushword = codeword + 127;
+         if (ValidOutputWord(pushword) != DmtxTrue)
+            return NULL;
+         PushOutputWord(msg, pushword);
          upperShift = DmtxFalse;
       }
       else if(codeword == DmtxValueAsciiUpperShift) {
@@ -229,13 +244,16 @@
          PushOutputWord(msg, codeword - 1);
       }
       else if(codeword <= 229) {
-         digits = codeword - 130;
+         int digits = codeword - 130;
          PushOutputWord(msg, digits/10 + '0');
          PushOutputWord(msg, digits - (digits/10)*10 + '0');
       }
       else if(codeword == DmtxValueFNC1) {
          if(msg->fnc1 != DmtxUndefined) {
-             PushOutputWord(msg, msg->fnc1);
+             int pushword = msg->fnc1;
+             if (ValidOutputWord(pushword) != DmtxTrue)
+                return NULL;
+             PushOutputWord(msg, pushword);
          }
       }
    }
@@ -488,7 +506,8 @@
  * \param  msg
  * \param  ptr
  * \param  dataEnd
- * \return Pointer to next undecoded codeword
+ * \return Pointer to next undecoded codeword,
+ *         NULL if an error was detected in the stream
  */
 static unsigned char *
 DecodeSchemeBase256(DmtxMessage *msg, unsigned char *ptr, unsigned char 
*dataEnd)
@@ -515,7 +534,7 @@
    }
 
    if(ptrEnd > dataEnd)
-      exit(40); /* XXX needs cleaner error handling */
+      return NULL;
 
    while(ptr < ptrEnd)
       PushOutputWord(msg, UnRandomize255State(*(ptr++), idx++));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxencode.c 
new/libdmtx-0.7.7/dmtxencode.c
--- old/libdmtx-0.7.5/dmtxencode.c      2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/dmtxencode.c      2022-04-25 20:50:47.000000000 +0200
@@ -213,7 +213,7 @@
    assert(bitsPerPixel % 8 == 0);
 
    /* Allocate memory for the image to be generated */
-   pxl = (unsigned char *)malloc(width * height * (bitsPerPixel/8) + 
enc->rowPadBytes);
+   pxl = (unsigned char *)malloc((width * bitsPerPixel / 8 + enc->rowPadBytes) 
* height);
    if(pxl == NULL) {
       perror("pixel malloc error");
       return DmtxFail;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxencodeedifact.c 
new/libdmtx-0.7.7/dmtxencodeedifact.c
--- old/libdmtx-0.7.5/dmtxencodeedifact.c       2018-03-25 20:32:01.000000000 
+0200
+++ new/libdmtx-0.7.7/dmtxencodeedifact.c       2022-04-25 20:50:47.000000000 
+0200
@@ -27,7 +27,13 @@
    {
       /* Check for FNC1 character, which needs to be sent in ASCII */
       value = StreamInputPeekNext(stream); CHKERR;
-      if(stream->fnc1 != DmtxUndefined && (int)value == stream->fnc1) {
+
+      if((value < 32 || value > 94)) {
+         StreamMarkInvalid(stream, DmtxChannelUnsupportedChar);
+         return;
+      }
+
+      if (stream->fnc1 != DmtxUndefined && (int)value == stream->fnc1) {
          EncodeChangeScheme(stream, DmtxSchemeAscii, DmtxUnlatchExplicit); 
CHKERR;
 
          StreamInputAdvanceNext(stream); CHKERR;
@@ -56,7 +62,7 @@
     *  TODO: UNOX -> ISO-2022-JP
     *  TODO: and so on
     */
-   if(value < 32 || value > 94)
+   if(value < 31 || value > 94)
    {
       StreamMarkInvalid(stream, DmtxChannelUnsupportedChar);
       return;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxreedsol.c 
new/libdmtx-0.7.7/dmtxreedsol.c
--- old/libdmtx-0.7.5/dmtxreedsol.c     2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/dmtxreedsol.c     2022-04-25 20:50:47.000000000 +0200
@@ -369,7 +369,8 @@
 
          /* Calculate error location polynomial elp[i] (set 1st term) */
          for(lambda = elp[m].length - 1, j = 0; j <= lambda; j++)
-            elp[iNext].b[j+i-m] = antilog301[(NN - log301[dis.b[m]] +
+            elp[iNext].b[j+i-m] = (elp[i - 1].b[j] == 0) ? 0 :
+                  antilog301[(NN - log301[dis.b[m]] +
                   log301[dis.b[i]] + log301[elp[m].b[j]]) % NN];
 
          /* Calculate error location polynomial elp[i] (add 2nd term) */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxstatic.h 
new/libdmtx-0.7.7/dmtxstatic.h
--- old/libdmtx-0.7.5/dmtxstatic.h      2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/dmtxstatic.h      2022-04-25 20:50:47.000000000 +0200
@@ -157,7 +157,7 @@
 static DmtxPassFail PopulateArrayFromMatrix(DmtxDecode *dec, DmtxRegion *reg, 
DmtxMessage *msg);
 
 /* dmtxdecodescheme.c */
-static void DecodeDataStream(DmtxMessage *msg, int sizeIdx, unsigned char 
*outputStart);
+static DmtxPassFail DecodeDataStream(DmtxMessage *msg, int sizeIdx, unsigned 
char *outputStart);
 static int GetEncodationScheme(unsigned char cw);
 static void PushOutputWord(DmtxMessage *msg, int value);
 static void PushOutputC40TextWord(DmtxMessage *msg, C40TextState *state, int 
value);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/dmtxsymbol.c 
new/libdmtx-0.7.7/dmtxsymbol.c
--- old/libdmtx-0.7.5/dmtxsymbol.c      2018-03-25 20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/dmtxsymbol.c      2022-04-25 20:50:47.000000000 +0200
@@ -25,8 +25,8 @@
 extern int 
 getSizeIdxFromSymbolDimension(int rows, int cols)
 {
-  int symbolRows, symbolCols;
-  for (int i=0; i<30; i++){
+  int symbolRows, symbolCols, i;
+  for (i=0; i<30; i++){
     symbolRows = dmtxGetSymbolAttribute(DmtxSymAttribSymbolRows, i);
     symbolCols = dmtxGetSymbolAttribute(DmtxSymAttribSymbolCols, i);
     if (rows==symbolRows && cols==symbolCols){
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/CMakeLists.txt 
new/libdmtx-0.7.7/test/CMakeLists.txt
--- old/libdmtx-0.7.5/test/CMakeLists.txt       1970-01-01 01:00:00.000000000 
+0100
+++ new/libdmtx-0.7.7/test/CMakeLists.txt       2022-04-25 20:50:47.000000000 
+0200
@@ -0,0 +1,13 @@
+cmake_minimum_required(VERSION 3.12)
+
+enable_testing()
+
+add_executable(test_simple
+  "simple_test/simple_test.c")
+target_link_libraries(test_simple PRIVATE dmtx)
+add_test(NAME test_simple COMMAND $<TARGET_FILE:test_simple>)
+
+add_executable(test_unit
+  "unit_test/unit_test.c")
+target_link_libraries(test_unit PRIVATE dmtx)
+add_test(NAME test_unit COMMAND $<TARGET_FILE:test_unit>)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/multi_test/Makefile.am 
new/libdmtx-0.7.7/test/multi_test/Makefile.am
--- old/libdmtx-0.7.5/test/multi_test/Makefile.am       2018-03-25 
20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/test/multi_test/Makefile.am       2022-04-25 
20:50:47.000000000 +0200
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
+AM_CPPFLAGS = -Wshadow -Wall -pedantic -std=c99
 
 check_PROGRAMS = multi_test
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/rotate_test/Makefile.am 
new/libdmtx-0.7.7/test/rotate_test/Makefile.am
--- old/libdmtx-0.7.5/test/rotate_test/Makefile.am      2018-03-25 
20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/test/rotate_test/Makefile.am      2022-04-25 
20:50:47.000000000 +0200
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
+AM_CPPFLAGS = -Wshadow -Wall -pedantic -std=c99
 
 check_PROGRAMS = rotate_test
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/simple_test/Makefile.am 
new/libdmtx-0.7.7/test/simple_test/Makefile.am
--- old/libdmtx-0.7.5/test/simple_test/Makefile.am      2018-03-25 
20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/test/simple_test/Makefile.am      2022-04-25 
20:50:47.000000000 +0200
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
+AM_CPPFLAGS = -Wshadow -Wall -pedantic -std=c99
 
 check_PROGRAMS = simple_test
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/simple_test/simple_test.c 
new/libdmtx-0.7.7/test/simple_test/simple_test.c
--- old/libdmtx-0.7.5/test/simple_test/simple_test.c    2018-03-25 
20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/test/simple_test/simple_test.c    2022-04-25 
20:50:47.000000000 +0200
@@ -18,7 +18,8 @@
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
-#include <dmtx.h>
+#include <math.h>
+#include "../../dmtx.h"
 
 int
 main(int argc, char *argv[])
@@ -38,10 +39,12 @@
 
    enc = dmtxEncodeCreate();
 
-   //dmtxEncodeSetProp( enc, DmtxPropPixelPacking, DmtxPack16bppRGB );
-   //dmtxEncodeSetProp( enc, DmtxPropPixelPacking, DmtxPack32bppRGB );
-   //dmtxEncodeSetProp( enc, DmtxPropWidth, 160 );
-   //dmtxEncodeSetProp( enc, DmtxPropHeight, 160 );
+   /*
+    dmtxEncodeSetProp( enc, DmtxPropPixelPacking, DmtxPack16bppRGB );
+    dmtxEncodeSetProp( enc, DmtxPropPixelPacking, DmtxPack32bppRGB );
+    dmtxEncodeSetProp( enc, DmtxPropWidth, 160 );
+    dmtxEncodeSetProp( enc, DmtxPropHeight, 160 );
+   */
 
    assert(enc != NULL);
    dmtxEncodeDataMatrix(enc, strlen((const char *)str), str);
@@ -58,9 +61,9 @@
 
    dmtxEncodeDestroy(&enc);
 
-   fprintf(stdout, "width:  \"%d\"\n", width);
-   fprintf(stdout, "height: \"%d\"\n", height);
-   fprintf(stdout, "bpp:    \"%d\"\n", bytesPerPixel);
+   fprintf(stdout, "width:  \"%zd\"\n", width);
+   fprintf(stdout, "height: \"%zd\"\n", height);
+   fprintf(stdout, "bpp:    \"%zd\"\n", bytesPerPixel);
 
    for (int i=0; i<width*height; i++){
       fprintf(stdout, "%d", (pxl[i*3])==0);
@@ -81,9 +84,9 @@
    if(reg != NULL) {
       msg = dmtxDecodeMatrixRegion(dec, reg, DmtxUndefined);
 
-      fprintf(stdout, "msg->arraySize :  \"%d\"\n", msg->arraySize );
-      fprintf(stdout, "msg->codeSize  :  \"%d\"\n", msg->codeSize  );
-      fprintf(stdout, "msg->outputSize:  \"%d\"\n", msg->outputSize);
+      fprintf(stdout, "msg->arraySize :  \"%zd\"\n", msg->arraySize );
+      fprintf(stdout, "msg->codeSize  :  \"%zd\"\n", msg->codeSize  );
+      fprintf(stdout, "msg->outputSize:  \"%zd\"\n", msg->outputSize);
       int oned = sqrt(msg->arraySize);
       for (int i=0; i<msg->arraySize; i++){
          fprintf(stdout, " %c.", msg->array[i]);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/unit_test/Makefile.am 
new/libdmtx-0.7.7/test/unit_test/Makefile.am
--- old/libdmtx-0.7.5/test/unit_test/Makefile.am        2018-03-25 
20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/test/unit_test/Makefile.am        2022-04-25 
20:50:47.000000000 +0200
@@ -1,4 +1,4 @@
-AM_CPPFLAGS = -Wshadow -Wall -pedantic -ansi
+AM_CPPFLAGS = -Wshadow -Wall -pedantic -std=c99
 
 check_PROGRAMS = unit_test
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/libdmtx-0.7.5/test/unit_test/unit_test.c 
new/libdmtx-0.7.7/test/unit_test/unit_test.c
--- old/libdmtx-0.7.5/test/unit_test/unit_test.c        2018-03-25 
20:32:01.000000000 +0200
+++ new/libdmtx-0.7.7/test/unit_test/unit_test.c        2022-04-25 
20:50:47.000000000 +0200
@@ -18,10 +18,15 @@
 #include <stdio.h>
 #include <string.h>
 #include "../../dmtx.h"
-#include "../../util/common/dmtxutil.h"
 
 char *programName;
 
+static void FatalError(int idx, char* msg)
+{
+   fprintf(stdout, "FAIL: (%d) %s\n", idx, msg);
+   exit(1);
+}
+
 static void timeAddTest(void);
 static void timePrint(DmtxTime t);
 

Reply via email to