summaryrefslogtreecommitdiff
path: root/source/html
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-06-14 17:06:50 +0100
committerRobin Watts <robin.watts@artifex.com>2016-06-17 13:24:47 +0100
commit4a4e6adae4c1a0e9ab3b6fad477edfe26c1a2aca (patch)
tree4ed45be7545229ce5d8bb124a8332b5444004b1b /source/html
parentc9bad4ef3e32bc799b134bc3b258f9392cf60e3e (diff)
downloadmupdf-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/html')
-rw-r--r--source/html/css-apply.c6
-rw-r--r--source/html/epub-doc.c6
-rw-r--r--source/html/html-doc.c2
-rw-r--r--source/html/html-layout.c2
4 files changed, 8 insertions, 8 deletions
diff --git a/source/html/css-apply.c b/source/html/css-apply.c
index bf082f0d..62b06288 100644
--- a/source/html/css-apply.c
+++ b/source/html/css-apply.c
@@ -235,7 +235,7 @@ match_att_has_condition(fz_xml *node, const char *att, const char *needle)
{
const char *haystack = fz_xml_att(node, att);
const char *ss;
- int n;
+ size_t n;
if (haystack) {
/* Try matching whole property first. */
if (!strcmp(haystack, needle))
@@ -1013,8 +1013,8 @@ color_from_value(fz_css_value *value, fz_css_color initial)
if (value->type == CSS_HASH)
{
- int r, g, b, n;
- n = strlen(value->data);
+ int r, g, b;
+ size_t n = strlen(value->data);
if (n == 3)
{
r = tohex(value->data[0]) * 16 + tohex(value->data[0]);
diff --git a/source/html/epub-doc.c b/source/html/epub-doc.c
index 5f67e0d4..408c3345 100644
--- a/source/html/epub-doc.c
+++ b/source/html/epub-doc.c
@@ -402,11 +402,11 @@ epub_lookup_metadata(fz_context *ctx, fz_document *doc_, const char *key, char *
{
epub_document *doc = (epub_document*)doc_;
if (!strcmp(key, FZ_META_FORMAT))
- return fz_strlcpy(buf, "EPUB", size);
+ return (int)fz_strlcpy(buf, "EPUB", size);
if (!strcmp(key, FZ_META_INFO_TITLE) && doc->dc_title)
- return fz_strlcpy(buf, doc->dc_title, size);
+ return (int)fz_strlcpy(buf, doc->dc_title, size);
if (!strcmp(key, FZ_META_INFO_AUTHOR) && doc->dc_creator)
- return fz_strlcpy(buf, doc->dc_creator, size);
+ return (int)fz_strlcpy(buf, doc->dc_creator, size);
return -1;
}
diff --git a/source/html/html-doc.c b/source/html/html-doc.c
index a7f48111..94ceddb4 100644
--- a/source/html/html-doc.c
+++ b/source/html/html-doc.c
@@ -107,7 +107,7 @@ int
htdoc_lookup_metadata(fz_context *ctx, fz_document *doc_, const char *key, char *buf, int size)
{
if (!strcmp(key, "format"))
- return fz_strlcpy(buf, "XHTML", size);
+ return (int)fz_strlcpy(buf, "XHTML", size);
return -1;
}
diff --git a/source/html/html-layout.c b/source/html/html-layout.c
index 5fc6e321..95d6151a 100644
--- a/source/html/html-layout.c
+++ b/source/html/html-layout.c
@@ -1828,7 +1828,7 @@ fz_draw_html(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, fz_html *box
static char *concat_text(fz_context *ctx, fz_xml *root)
{
fz_xml *node;
- int i = 0, n = 1;
+ size_t i = 0, n = 1;
char *s;
for (node = fz_xml_down(root); node; node = fz_xml_next(node))
{