diff options
| author | Mattias Andrée <maandree@kth.se> | 2016-03-04 09:28:01 +0100 |
|---|---|---|
| committer | Mattias Andrée <maandree@kth.se> | 2016-03-04 09:28:01 +0100 |
| commit | 0a7e36380717fe926d43ab30ef6162db9bd71723 (patch) | |
| tree | b0ad75c7525688f8e54319e440b251213a4ef3db /src/zstr.c | |
| parent | Add zptest (diff) | |
| download | libzahl-0a7e36380717fe926d43ab30ef6162db9bd71723.tar.gz libzahl-0a7e36380717fe926d43ab30ef6162db9bd71723.tar.bz2 libzahl-0a7e36380717fe926d43ab30ef6162db9bd71723.tar.xz | |
Add makefile and fix errors
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/zstr.c')
| -rw-r--r-- | src/zstr.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* See LICENSE file for copyright and license details. */ -#include "internals" +#include "internals.h" #include <stdio.h> @@ -39,7 +39,7 @@ zstr(z_t a, char *b) neg = zsignum(a) < 0; zabs(num, a); - n -= neg; + n -= (size_t)neg; n = n > 9 ? (n - 9) : 0; b[0] = '-'; b += neg; @@ -53,7 +53,7 @@ zstr(z_t a, char *b) overridden = b[n + (9 - 1)]; n = n > 9 ? (n - 9) : 0; } else { - n += sprintf(b + n, "%lu", (unsigned long)(rem->chars[0])); + n += (size_t)sprintf(b + n, "%lu", (unsigned long)(rem->chars[0])); b[n] = overridden; break; } |
