[Debian-med-packaging] C++ help needed for new version of tifffile
Sven Joachim
svenjoac at gmx.de
Thu Oct 5 19:56:39 UTC 2017
On 2017-10-05 21:00 +0200, Andreas Tille wrote:
> I migrated the Debian packaging of tifffile from SVN to Git[1]. After
> upgrading to the latest upstream version (dated 2017-09-14) I get:
>
> ...
> x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -g -O2 -fdebug-prefix-map=/build/tifffile-20170914=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/include/python2.7 -c tifffile.c -o build/temp.linux-x86_64-2.7/tifffile.o
> tifffile.c:575:1: warning: return type defaults to 'int' [-Wimplicit-int]
> py_decodelzw(PyObject* obj, PyObject* args)
> ^~~~~~~~~~~~
> tifffile.c: In function 'py_decodelzw':
> tifffile.c:590:16: warning: return makes integer from pointer without a cast [-Wint-conversion]
> return NULL;
> ^~~~
> tifffile.c:634:9: error: expected identifier or '(' before 'if'
> if (code == 257) break; /* end of information */
> ^~
> tifffile.c:645:32: error: expected identifier or '(' before '}' token
> do { GET_NEXT_CODE } while (code == 256);
> ^
> tifffile.c:648:11: error: expected 'while' before 'else'
> } else {
> ^~~~
> tifffile.c:704:9: error: expected identifier or '(' before 'if'
> if (code == 257) break; /* end of information */
> ^~
> tifffile.c:713:32: error: expected identifier or '(' before '}' token
> do { GET_NEXT_CODE } while (code == 256);
> ^
> ...
>
>
> It seems that the definition of GET_NEXT_CODE is just wrong - but
> what would be correct?
Remove the last backslash, or include a blank line after it. This
prevents the "static PyObject*" line from becoming part of the macro
definition.
--8<---------------cut here---------------start------------->8---
diff --git a/tifffile.c b/tifffile.c
index 655977d..1a8ec51 100644
--- a/tifffile.c
+++ b/tifffile.c
@@ -571,6 +571,7 @@ char py_decodelzw_doc[] = "Return TIFF LZW decoded string.";
code &= mask; \
code >>= shr; \
bitcount += bitw; \
+
static PyObject*
py_decodelzw(PyObject* obj, PyObject* args)
{
--8<---------------cut here---------------end--------------->8---
Cheers,
Sven
More information about the Debian-med-packaging
mailing list