diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-02 18:37:16 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-03-02 18:37:16 +0000 |
commit | 0d248200f10cee87ba12a8de9cb50eac00d6cd07 (patch) | |
tree | 96a8be578a1d6df5dd04729b157cb63697f989f6 | |
parent | 553939ce35affac69b472e23eb30fed10a930187 (diff) | |
download | libcss-0d248200f10cee87ba12a8de9cb50eac00d6cd07.tar.gz libcss-0d248200f10cee87ba12a8de9cb50eac00d6cd07.tar.bz2 |
Initialise variables.
Actually make disabling of CSS dumping work.
svn path=/trunk/libcss/; revision=6670
-rw-r--r-- | test/css21.c | 10 | ||||
-rw-r--r-- | test/dump_computed.h | 8 | ||||
-rw-r--r-- | test/select-auto.c | 2 |
3 files changed, 11 insertions, 9 deletions
diff --git a/test/css21.c b/test/css21.c index b19fc2e..47aaf2f 100644 --- a/test/css21.c +++ b/test/css21.c @@ -4,13 +4,15 @@ #include <libcss/libcss.h> #include "stylesheet.h" -#include "dump.h" -#include "testutils.h" - #define ITERATIONS (1) -#define DUMP_HASH (1) #define DUMP_CSS (1) +#if DUMP_CSS +#include "dump.h" +#endif + +#include "testutils.h" + static void *myrealloc(void *ptr, size_t len, void *pw) { UNUSED(pw); diff --git a/test/dump_computed.h b/test/dump_computed.h index 22aa639..7f3d141 100644 --- a/test/dump_computed.h +++ b/test/dump_computed.h @@ -141,10 +141,10 @@ static void dump_computed_style(const css_computed_style *style, char *buf, char *ptr = buf; size_t wrote = 0; uint8_t val; - css_colour color; - lwc_string *url; - css_fixed len1, len2; - css_unit unit1, unit2; + css_colour color = 0; + lwc_string *url = NULL; + css_fixed len1 = 0, len2 = 0; + css_unit unit1 = CSS_UNIT_PX, unit2 = CSS_UNIT_PX; /* background-attachment */ val = css_computed_background_attachment(style); diff --git a/test/select-auto.c b/test/select-auto.c index a4e6158..daef112 100644 --- a/test/select-auto.c +++ b/test/select-auto.c @@ -407,7 +407,7 @@ void parse_sheet(line_ctx *ctx, const char *data, size_t len) { const char *p; const char *end = data + len; - css_origin origin; + css_origin origin = CSS_ORIGIN_AUTHOR; uint64_t media = CSS_MEDIA_ALL; css_stylesheet *sheet; css_stylesheet **temp; |