Package: libnifti1
Version: 1.1.0-3.1~debug.1
Severity: minor

This is an addendum to #587912:
as you can see [1] libnifti spits out messages like

** ERROR: NWAD: wrote only 83065408 of 83065408 bytes to file
before saving/loading
everything 1s
after saving/loading
++ WARNING: nifti_read_buffer(/tmp/ones.nii.gz):
   data bytes needed = 83065408
   data bytes input  = 83065408

or

NWAD: wrote only 1810824704 of 1810824704 bytes to file

which make no sense.  It is due to the use of casting to unsigned and '%u' in
string formatting, while comparison is done on type_t (so it is correct). E.g.:

      if (ss < nim->nbyper * nim->nvox){
         fprintf(stderr,
            "** ERROR: NWAD: wrote only %u of %u bytes to file\n",
            (unsigned)ss, (unsigned)(nim->nbyper * nim->nvox));
         return -1;
      }

imho casting of print arguments should be removed, and string formatting should
be changed from

'%u' (unsigned int) into '%ju', where

       j      A following integer conversion corresponds to an intmax_t or 
uintmax_t argument.

there is also more appropriate 'z' but it seems to be unadvised, although
might be not really a problem any longer at our times ;)

       z      A following integer conversion corresponds to a size_t or ssize_t 
argument.  (Linux libc5 has Z with this meaning.  Don't use it.)

so may be to '%zu' to become really proper

Thanks in advance for forwarding it upstream.

Cheers

[1] 
http://lists.alioth.debian.org/pipermail/pkg-exppsy-pymvpa/2010q2/001168.html


-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (901, 'unstable'), (900, 'testing'), (300, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libnifti1 depends on:
ii  libc6                   2.11.1-2         Embedded GNU C Library: Shared lib
ii  zlib1g                  1:1.2.3.5.dfsg-1 compression library - runtime

libnifti1 recommends no packages.

libnifti1 suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to