summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJorge Arellano Cid <jcid@dillo.org>2011-06-21 21:06:38 -0400
committerJorge Arellano Cid <jcid@dillo.org>2011-06-21 21:06:38 -0400
commit86ad9513a8d090501dd602b00b70fecc31eeaaa4 (patch)
tree5b3d54986b78148658ca43015a579226e278d07c /src
parentc1a46d534c0d4b67f71c6e4a378de94ba4c6aaa4 (diff)
Eliminated a pack of 22 compiler warnings (gcc-4.6.1 amd64)
Diffstat (limited to 'src')
-rw-r--r--src/cssparser.cc3
-rw-r--r--src/html.cc12
-rw-r--r--src/nav.c3
-rw-r--r--src/table.cc9
-rw-r--r--src/ui.cc2
5 files changed, 7 insertions, 22 deletions
diff --git a/src/cssparser.cc b/src/cssparser.cc
index f173f403..3d62b31d 100644
--- a/src/cssparser.cc
+++ b/src/cssparser.cc
@@ -1049,7 +1049,7 @@ void CssParser::parseDeclaration(CssPropertyList * props,
CssPropertyList * importantProps)
{
CssPropertyInfo pi = {NULL, {CSS_TYPE_UNUSED}, NULL}, *pip;
- CssShorthandInfo si, *sip;
+ CssShorthandInfo *sip;
CssValueType type = CSS_TYPE_UNUSED;
CssPropertyName prop;
@@ -1087,7 +1087,6 @@ void CssParser::parseDeclaration(CssPropertyList * props,
}
} else {
/* Try shorthands. */
- si.symbol = tval;
sip =
(CssShorthandInfo *) bsearch(&pi, Css_shorthand_info,
CSS_SHORTHAND_NUM,
diff --git a/src/html.cc b/src/html.cc
index 264e0041..1bdbd8fb 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -1718,7 +1718,6 @@ static void Html_tag_close_style(DilloHtml *html, int TagIdx)
static void Html_tag_open_body(DilloHtml *html, const char *tag, int tagsize)
{
const char *attrbuf;
- Textblock *textblock;
int32_t color;
int tag_index_a = a_Html_tag_index ("a");
style::Color *bgColor;
@@ -1736,8 +1735,6 @@ static void Html_tag_open_body(DilloHtml *html, const char *tag, int tagsize)
BUG_MSG("unclosed HEAD element\n");
}
- textblock = HT2TB(html);
-
if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
color = a_Html_color_parse(html, attrbuf, -1);
if (color != -1)
@@ -2165,7 +2162,6 @@ static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize)
{
DilloImage *Image;
DilloUrl *url, *usemap_url;
- Textblock *textblock;
const char *attrbuf;
/* This avoids loading images. Useful for viewing suspicious HTML email. */
@@ -2176,8 +2172,6 @@ static void Html_tag_open_img(DilloHtml *html, const char *tag, int tagsize)
!(url = a_Html_url_new(html, attrbuf, NULL, 0)))
return;
- textblock = HT2TB(html);
-
usemap_url = NULL;
if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "usemap")))
/* TODO: usemap URLs outside of the document are not used. */
@@ -2254,12 +2248,11 @@ static void Html_tag_close_map(DilloHtml *html, int TagIdx)
static
misc::SimpleVector<int> *Html_read_coords(DilloHtml *html, const char *str)
{
- int i, coord;
+ int coord;
const char *tail = str;
char *newtail = NULL;
misc::SimpleVector<int> *coords = new misc::SimpleVector<int> (4);
- i = 0;
while (1) {
coord = strtol(tail, &newtail, 10);
if (coord == 0 && newtail == tail)
@@ -2959,14 +2952,13 @@ void a_Html_load_stylesheet(DilloHtml *html, DilloUrl *url)
if (endq && (endq - data <= 51)) {
/* IANA limits charset names to 40 characters */
- const char *ignored;
char *content_type;
*endq = '\0';
content_type = dStrconcat("text/css; charset=", data+10, NULL);
*endq = '"';
a_Capi_unref_buf(url);
- ignored = a_Capi_set_content_type(url, content_type, "meta");
+ a_Capi_set_content_type(url, content_type, "meta");
dFree(content_type);
a_Capi_get_buf(url, &data, &len);
}
diff --git a/src/nav.c b/src/nav.c
index 7f9d03db..f7aa26c9 100644
--- a/src/nav.c
+++ b/src/nav.c
@@ -195,13 +195,12 @@ static void Nav_open_url(BrowserWindow *bw, const DilloUrl *url,
const DilloUrl *requester, int offset)
{
const DilloUrl *old_url;
- bool_t MustLoad, ForceReload, Repush, IgnoreScroll;
+ bool_t MustLoad, ForceReload, IgnoreScroll;
int x, y, idx, ClientKey;
DilloWeb *Web;
MSG("Nav_open_url: new url='%s'\n", URL_STR_(url));
- Repush = (URL_FLAGS(url) & URL_ReloadFromCache) != 0;
ForceReload = (URL_FLAGS(url) & (URL_E2EQuery + URL_ReloadFromCache)) != 0;
IgnoreScroll = (URL_FLAGS(url) & URL_IgnoreScroll) != 0;
diff --git a/src/table.cc b/src/table.cc
index 58cdf22e..d48a0c45 100644
--- a/src/table.cc
+++ b/src/table.cc
@@ -151,7 +151,6 @@ void Html_tag_open_tr(DilloHtml *html, const char *tag, int tagsize)
{
const char *attrbuf;
int32_t bgcolor = -1;
- bool new_style = false;
html->styleEngine->inheritNonCssHints ();
@@ -183,10 +182,8 @@ void Html_tag_open_tr(DilloHtml *html, const char *tag, int tagsize)
if (bgcolor != -1) {
html->styleEngine->setNonCssHint(CSS_PROPERTY_BACKGROUND_COLOR,
CSS_TYPE_COLOR, bgcolor);
- new_style = true;
}
- if (a_Html_tag_set_valign_attr (html, tag, tagsize))
- new_style = true;
+ a_Html_tag_set_valign_attr (html, tag, tagsize);
break;
default:
break;
@@ -318,7 +315,6 @@ static void Html_tag_open_table_cell(DilloHtml *html,
int colspan = 1, rowspan = 1;
const char *attrbuf;
int32_t bgcolor;
- bool_t new_style;
html->styleEngine->inheritNonCssHints ();
@@ -363,8 +359,7 @@ static void Html_tag_open_table_cell(DilloHtml *html,
a_Html_parse_length (html, attrbuf));
}
- if (a_Html_tag_set_valign_attr (html, tag, tagsize))
- new_style = TRUE;
+ a_Html_tag_set_valign_attr (html, tag, tagsize);
if ((attrbuf = a_Html_get_attr(html, tag, tagsize, "bgcolor"))) {
bgcolor = a_Html_color_parse(html, attrbuf, -1);
diff --git a/src/ui.cc b/src/ui.cc
index 1731f469..c50282d3 100644
--- a/src/ui.cc
+++ b/src/ui.cc
@@ -425,7 +425,7 @@ Fl_Button *UI::make_button(const char *label, Fl_Image *img, Fl_Image *deimg,
b->image(img);
if (deimg)
b->deimage(deimg);
- b->callback(b1_cb, (void *)b_n);
+ b->callback(b1_cb, INT2VOIDP(b_n));
b->clear_visible_focus();
b->labelsize(12);
b->box(FL_FLAT_BOX);