From 9a001f051aec79e75ec4fd05bd559226ae3d43b5 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Sat, 24 Sep 2011 02:25:51 +0200 Subject: [PATCH] Remove variables that were set but not used Required to make new gcc with default warning settings happy. --- src/document/dom/renderer.c | 3 +-- src/dom/select.c | 3 --- src/protocol/nntp/response.c | 7 +------ src/viewer/text/form.c | 3 --- 4 files changed, 2 insertions(+), 14 deletions(-) diff --git a/src/document/dom/renderer.c b/src/document/dom/renderer.c index 32484dadc..97b2854ef 100644 --- a/src/document/dom/renderer.c +++ b/src/document/dom/renderer.c @@ -90,7 +90,6 @@ render_dom_document(struct cache_entry *cached, struct document *document, unsigned char *string = struri(cached->uri); size_t length = strlen(string); struct dom_string uri = INIT_DOM_STRING(string, length); - enum dom_code code; convert_table = get_convert_table(head, document->options.cp, document->options.assume_cp, @@ -129,7 +128,7 @@ render_dom_document(struct cache_entry *cached, struct document *document, * However, it will be useful when we will be able to also * incrementally parse new data. This will require the parser to live * during the fetching of data. */ - code = parse_sgml(parser, buffer->source, buffer->length, 1); + parse_sgml(parser, buffer->source, buffer->length, 1); if (parser->root) { assert(parser->stack.depth == 1); diff --git a/src/dom/select.c b/src/dom/select.c index b7b7e5997..3b17dcbd0 100644 --- a/src/dom/select.c +++ b/src/dom/select.c @@ -961,15 +961,12 @@ dom_select_push_text(struct dom_stack *stack, struct dom_node *node, void *data) struct dom_stack_state *state = get_dom_stack_top(&select_data->stack); struct dom_select_node *selector = (void *) state->node; struct dom_select_node *text_sel = get_child_dom_select_node(selector, DOM_NODE_TEXT); - struct dom_string *text; WDBG("Text node: %d chars", node->string.length); if (!text_sel) return DOM_CODE_OK; - text = &text_sel->node.string; - switch (node->type) { case DOM_NODE_TEXT: case DOM_NODE_CDATA_SECTION: diff --git a/src/protocol/nntp/response.c b/src/protocol/nntp/response.c index 21327106d..2448b066b 100644 --- a/src/protocol/nntp/response.c +++ b/src/protocol/nntp/response.c @@ -273,15 +273,11 @@ static void add_header_to_string(struct string *str, unsigned char *header) { unsigned char *end; - int rfc2047 = 0; while ((end = strstr(header, "=?")) != NULL) { int encoding; - unsigned char charset_q[256]; unsigned char *cp, *sp; - rfc2047 = 1; - if (header != end) { add_html_to_string(str, header, end - header); header = end; @@ -297,8 +293,7 @@ add_header_to_string(struct string *str, unsigned char *header) break; for (sp = end; sp < cp; sp++) - charset_q[sp - end] = c_tolower(*sp); - charset_q[cp - end] = 0; + /* charset */; encoding = c_tolower(cp[1]); if (!encoding || cp[2] != '?') diff --git a/src/viewer/text/form.c b/src/viewer/text/form.c index 09efec75a..20fb36132 100644 --- a/src/viewer/text/form.c +++ b/src/viewer/text/form.c @@ -421,7 +421,6 @@ draw_form_entry(struct terminal *term, struct document_view *doc_view, unsigned char *s; #ifdef CONFIG_UTF8 unsigned char *text, *end, *last_in_view; - int retried; #endif /* CONFIG_UTF8 */ int len; int i, x, y; @@ -458,7 +457,6 @@ draw_form_entry(struct terminal *term, struct document_view *doc_view, break; #ifdef CONFIG_UTF8 utf8: - retried = 0; retry_after_scroll: text = fs->value; @@ -568,7 +566,6 @@ drew_char: if (fs->vpos != ptr - fs->value) { fs->vpos = ptr - fs->value; - retried = 1; goto retry_after_scroll; } }