diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-06-14 17:06:50 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-06-17 13:24:47 +0100 |
commit | 4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca (patch) | |
tree | 4ed45be7545229ce5d8bb124a8332b5444004b1b /source/fitz/string.c | |
parent | c9bad4ef3e32bc799b134bc3b258f9392cf60e3e (diff) | |
download | mupdf-4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca.tar.xz |
Use 'size_t' instead of int as appropriate.
This silences the many warnings we get when building for x64
in windows.
This does not address any of the warnings we get in thirdparty
libraries - in particular harfbuzz. These look (at a quick
glance) harmless though.
Diffstat (limited to 'source/fitz/string.c')
-rw-r--r-- | source/fitz/string.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/fitz/string.c b/source/fitz/string.c index de9ee80f..2eb67d4f 100644 --- a/source/fitz/string.c +++ b/source/fitz/string.c @@ -30,12 +30,12 @@ fz_strsep(char **stringp, const char *delim) return ret; } -int -fz_strlcpy(char *dst, const char *src, int siz) +size_t +fz_strlcpy(char *dst, const char *src, size_t siz) { register char *d = dst; register const char *s = src; - register int n = siz; + register size_t n = siz; /* Copy as many bytes as will fit */ if (n != 0 && --n != 0) { @@ -56,13 +56,13 @@ fz_strlcpy(char *dst, const char *src, int siz) return(s - src - 1); /* count does not include NUL */ } -int -fz_strlcat(char *dst, const char *src, int siz) +size_t +fz_strlcat(char *dst, const char *src, size_t siz) { register char *d = dst; register const char *s = src; - register int n = siz; - int dlen; + register size_t n = siz; + size_t dlen; /* Find the end of dst and adjust bytes left but don't go past end */ while (*d != '\0' && n-- != 0) @@ -85,9 +85,9 @@ fz_strlcat(char *dst, const char *src, int siz) } void -fz_dirname(char *dir, const char *path, int n) +fz_dirname(char *dir, const char *path, size_t n) { - int i; + size_t i; if (!path || !path[0]) { @@ -143,7 +143,7 @@ fz_urldecode(char *url) } void -fz_format_output_path(fz_context *ctx, char *path, int size, const char *fmt, int page) +fz_format_output_path(fz_context *ctx, char *path, size_t size, const char *fmt, int page) { const char *s, *p; char num[40]; |