summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2012-07-01 12:52:27 (GMT)
committer Daniel Silverstone <dsilvers@digital-scurf.org>2012-07-01 12:52:27 (GMT)
commitffa1a35c53bf655cc21a1eef3c59d6f115b78a96 (patch)
tree5126b6f17631ff1d2c9f27b8f680b99def74a688
parent3786bf0e01a61ad32f841881b0e926940bcf6715 (diff)
parentc22068537d0aff33d163e283f57433f0bcfe3ab4 (diff)
downloadlibcss-ffa1a35c53bf655cc21a1eef3c59d6f115b78a96.tar.gz
libcss-ffa1a35c53bf655cc21a1eef3c59d6f115b78a96.tar.bz2
Merge CLANG fixes from dsilvers/clang-fix
-rw-r--r--src/select/propset.h25
-rw-r--r--src/stylesheet.c8
2 files changed, 18 insertions, 15 deletions
diff --git a/src/select/propset.h b/src/select/propset.h
index 978a667..2b705ae 100644
--- a/src/select/propset.h
+++ b/src/select/propset.h
@@ -235,7 +235,7 @@ static inline css_error set_counter_increment(
((type & 0x1) << COUNTER_INCREMENT_SHIFT);
for (c = counters; c != NULL && c->name != NULL; c++)
- lwc_string_ref(c->name);
+ c->name = lwc_string_ref(c->name);
style->uncommon->counter_increment = counters;
@@ -275,7 +275,7 @@ static inline css_error set_counter_reset(
((type & 0x1) << COUNTER_RESET_SHIFT);
for (c = counters; c != NULL && c->name != NULL; c++)
- lwc_string_ref(c->name);
+ c->name = lwc_string_ref(c->name);
style->uncommon->counter_reset = counters;
@@ -315,7 +315,7 @@ static inline css_error set_cursor(
((type & 0x1f) << CURSOR_SHIFT);
for (s = urls; s != NULL && *s != NULL; s++)
- lwc_string_ref(*s);
+ *s = lwc_string_ref(*s);
style->uncommon->cursor = urls;
@@ -417,20 +417,23 @@ static inline css_error set_content(
c->type != CSS_COMPUTED_CONTENT_NONE; c++) {
switch (c->type) {
case CSS_COMPUTED_CONTENT_STRING:
- lwc_string_ref(c->data.string);
+ c->data.string = lwc_string_ref(c->data.string);
break;
case CSS_COMPUTED_CONTENT_URI:
- lwc_string_ref(c->data.uri);
+ c->data.uri = lwc_string_ref(c->data.uri);
break;
case CSS_COMPUTED_CONTENT_ATTR:
- lwc_string_ref(c->data.attr);
+ c->data.attr = lwc_string_ref(c->data.attr);
break;
case CSS_COMPUTED_CONTENT_COUNTER:
- lwc_string_ref(c->data.counter.name);
+ c->data.counter.name =
+ lwc_string_ref(c->data.counter.name);
break;
case CSS_COMPUTED_CONTENT_COUNTERS:
- lwc_string_ref(c->data.counters.name);
- lwc_string_ref(c->data.counters.sep);
+ c->data.counters.name =
+ lwc_string_ref(c->data.counters.name);
+ c->data.counters.sep =
+ lwc_string_ref(c->data.counters.sep);
break;
default:
break;
@@ -697,7 +700,7 @@ static inline css_error set_quotes(
((type & 0x1) << QUOTES_SHIFT);
for (s = quotes; s != NULL && *s != NULL; s++)
- lwc_string_ref(*s);
+ *s = lwc_string_ref(*s);
style->quotes = quotes;
@@ -1624,7 +1627,7 @@ static inline css_error set_font_family(
((type & 0x7) << FONT_FAMILY_SHIFT);
for (s = names; s != NULL && *s != NULL; s++)
- lwc_string_ref(*s);
+ *s = lwc_string_ref(*s);
style->font_family = names;
diff --git a/src/stylesheet.c b/src/stylesheet.c
index e37a00a..c724864 100644
--- a/src/stylesheet.c
+++ b/src/stylesheet.c
@@ -984,17 +984,17 @@ css_error css__stylesheet_selector_append_specific(css_stylesheet *sheet,
return CSS_NOMEM;
/* Copy detail into empty block */
- (&temp->data)[num_details + 1] = *detail;
+ *(d = &(&temp->data)[num_details + 1]) = *detail;
/* Flag that there's another block */
(&temp->data)[num_details].next = 1;
/* Ref the strings */
if (detail->qname.ns != NULL)
- lwc_string_ref(detail->qname.ns);
- lwc_string_ref(detail->qname.name);
+ d->qname.ns = lwc_string_ref(detail->qname.ns);
+ d->qname.name = lwc_string_ref(detail->qname.name);
if (detail->value_type == CSS_SELECTOR_DETAIL_VALUE_STRING &&
detail->value.string != NULL)
- lwc_string_ref(detail->value.string);
+ d->value.string = lwc_string_ref(detail->value.string);
(*parent) = temp;