[cairo-commit] 2 commits - src/cairo-pdf.h src/cairo-pdf-interchange.c src/cairo-pdf-surface-private.h src/cairo-tag-attributes.c src/cairo-tag-attributes-private.h src/cairo-tag-stack-private.h test/pdf-tagged-text.c util/cairo-trace
Adrian Johnson
ajohnson at kemper.freedesktop.org
Tue Oct 4 02:23:50 UTC 2016
src/cairo-pdf-interchange.c | 6 +++---
src/cairo-pdf-surface-private.h | 2 +-
src/cairo-pdf.h | 6 +++---
src/cairo-tag-attributes-private.h | 5 ++++-
src/cairo-tag-attributes.c | 2 +-
src/cairo-tag-stack-private.h | 1 +
test/pdf-tagged-text.c | 1 +
util/cairo-trace/trace.c | 1 +
8 files changed, 15 insertions(+), 9 deletions(-)
New commits:
commit 55f8c6d9f4161f5ee2a11fd068f0ccb25a5b3aed
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Tue Oct 4 11:55:28 2016 +1030
fix compiler warnings
diff --git a/src/cairo-pdf-interchange.c b/src/cairo-pdf-interchange.c
index 622f3b3..fc21b32 100644
--- a/src/cairo-pdf-interchange.c
+++ b/src/cairo-pdf-interchange.c
@@ -757,7 +757,7 @@ _cairo_pdf_interchange_write_document_dests (cairo_pdf_surface_t *surface)
cairo_pdf_named_dest_t *dest = ic->sorted_dests[i];
cairo_pdf_resource_t page_res;
double x = 0;
- double y = y;
+ double y = 0;
if (dest->extents.valid) {
x = dest->extents.extents.x;
@@ -959,7 +959,7 @@ _cairo_pdf_interchange_tag_begin (cairo_pdf_surface_t *surface,
const char *name,
const char *attributes)
{
- cairo_int_status_t status;
+ cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
cairo_tag_type_t tag_type;
cairo_pdf_interchange_t *ic = &surface->interchange;
void *ptr;
@@ -1061,7 +1061,7 @@ cairo_int_status_t
_cairo_pdf_interchange_tag_end (cairo_pdf_surface_t *surface,
const char *name)
{
- cairo_int_status_t status;
+ cairo_int_status_t status = CAIRO_STATUS_SUCCESS;
cairo_pdf_interchange_t *ic = &surface->interchange;
cairo_tag_type_t tag_type;
cairo_tag_stack_elem_t *elem;
diff --git a/src/cairo-tag-attributes.c b/src/cairo-tag-attributes.c
index 5343308..685c26a 100644
--- a/src/cairo-tag-attributes.c
+++ b/src/cairo-tag-attributes.c
@@ -314,7 +314,7 @@ parse_attributes (const char *attributes, attribute_spec_t *attrib_def, cairo_li
{
attribute_spec_t *def;
attribute_t *attrib;
- char *name;
+ char *name = NULL;
cairo_int_status_t status;
const char *p = attributes;
diff --git a/test/pdf-tagged-text.c b/test/pdf-tagged-text.c
index 91b917f..e8484f0 100644
--- a/test/pdf-tagged-text.c
+++ b/test/pdf-tagged-text.c
@@ -123,6 +123,7 @@ layout_paragraph (cairo_t *cr)
text = strdup (ipsum_lorem);
begin = text;
end = text;
+ prev_end = end;
while (*begin) {
end = strchr(end, ' ');
if (!end) {
diff --git a/util/cairo-trace/trace.c b/util/cairo-trace/trace.c
index e3c9933..3c05613 100644
--- a/util/cairo-trace/trace.c
+++ b/util/cairo-trace/trace.c
@@ -1585,6 +1585,7 @@ _status_to_string (cairo_status_t status)
f(PNG_ERROR);
f(FREETYPE_ERROR);
f(WIN32_GDI_ERROR);
+ f(TAG_ERROR);
case CAIRO_STATUS_LAST_STATUS:
break;
}
commit 3c33d9704119d0178230a0cf9929941592836eab
Author: Adrian Johnson <ajohnson at redneon.com>
Date: Tue Oct 4 11:44:52 2016 +1030
fix make check
diff --git a/src/cairo-pdf-surface-private.h b/src/cairo-pdf-surface-private.h
index c1fd11a..a5c7d0e 100644
--- a/src/cairo-pdf-surface-private.h
+++ b/src/cairo-pdf-surface-private.h
@@ -344,7 +344,7 @@ cairo_private void
_cairo_pdf_surface_update_object (cairo_pdf_surface_t *surface,
cairo_pdf_resource_t resource);
-cairo_int_status_t
+cairo_private cairo_int_status_t
_cairo_utf8_to_pdf_string (const char *utf8, char **str_out);
cairo_private cairo_int_status_t
diff --git a/src/cairo-pdf.h b/src/cairo-pdf.h
index 62bf41f..1e46a7c 100644
--- a/src/cairo-pdf.h
+++ b/src/cairo-pdf.h
@@ -139,16 +139,16 @@ typedef enum _cairo_pdf_metadata {
CAIRO_PDF_METADATA_MOD_DATE,
} cairo_pdf_metadata_t;
-void
+cairo_public void
cairo_pdf_surface_set_metadata (cairo_surface_t *surface,
cairo_pdf_metadata_t metadata,
const char *utf8);
-void
+cairo_public void
cairo_pdf_surface_set_page_label (cairo_surface_t *surface,
const char *utf8);
-void
+cairo_public void
cairo_pdf_surface_set_thumbnail_size (cairo_surface_t *surface,
int width,
int height);
diff --git a/src/cairo-tag-attributes-private.h b/src/cairo-tag-attributes-private.h
index 69fd246..0af23dc 100644
--- a/src/cairo-tag-attributes-private.h
+++ b/src/cairo-tag-attributes-private.h
@@ -37,6 +37,9 @@
#ifndef CAIRO_TAG_ATTRIBUTES_PRIVATE_H
#define CAIRO_TAG_ATTRIBUTES_PRIVATE_H
+#include "cairo-array-private.h"
+#include "cairo-error-private.h"
+
typedef enum {
TAG_LINK_INVALID = 0,
TAG_LINK_EMPTY,
@@ -47,7 +50,7 @@ typedef enum {
typedef struct _cairo_link_attrs {
cairo_tag_link_type_t link_type;
- cairo_array_t rects; /* array of cairo_rectangle_t */
+ cairo_array_t rects;
char *dest;
char *uri;
char *file;
diff --git a/src/cairo-tag-stack-private.h b/src/cairo-tag-stack-private.h
index 9528cb4..4af2a85 100644
--- a/src/cairo-tag-stack-private.h
+++ b/src/cairo-tag-stack-private.h
@@ -37,6 +37,7 @@
#ifndef CAIRO_TAG_STACK_PRIVATE_H
#define CAIRO_TAG_STACK_PRIVATE_H
+#include "cairo-error-private.h"
#include "cairo-list-inline.h"
/* The type of a single tag */
More information about the cairo-commit
mailing list