aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-10-30 18:23:03 +0100
committerjcid <devnull@localhost>2008-10-30 18:23:03 +0100
commit3309d5e5590c510f8518cb2cce4cd555df2211e5 (patch)
treed99f6109ee7cb6049b55a1dc7cd82eab53d4c668 /src
parente1cb964a74ed9477716ea200aefb530771512ec0 (diff)
- Reduced warnings with gcc-4.3.
Diffstat (limited to 'src')
-rw-r--r--src/dialog.cc2
-rw-r--r--src/html.cc18
-rw-r--r--src/uicmd.cc3
-rw-r--r--src/url.h12
4 files changed, 18 insertions, 17 deletions
diff --git a/src/dialog.cc b/src/dialog.cc
index 69781f32..8408782f 100644
--- a/src/dialog.cc
+++ b/src/dialog.cc
@@ -193,7 +193,7 @@ int a_Dialog_choice5(const char *QuestionTxt,
txt[0] = txt[6] = NULL;
txt[1] = alt1; txt[2] = alt2; txt[3] = alt3;
txt[4] = alt4; txt[5] = alt5;
- for (int i=1; txt[i]; ++i, ++nb);
+ for (int i=1; txt[i]; ++i, ++nb) ;
Window *window = new Window(ww,wh,"Choice5");
window->begin();
diff --git a/src/html.cc b/src/html.cc
index 248091aa..88607395 100644
--- a/src/html.cc
+++ b/src/html.cc
@@ -1007,7 +1007,7 @@ static int Html_parse_entity(DilloHtml *html, const char *token,
} else if (isalpha(*s)) {
/* character entity reference */
- while (*++s && (isalnum(*s) || strchr(":_.-", *s)));
+ while (*++s && (isalnum(*s) || strchr(":_.-", *s))) ;
c = *s;
*s = 0;
@@ -1187,10 +1187,10 @@ static void Html_process_word(DilloHtml *html, const char *word, int size)
Pword = a_Html_parse_entities(html, word, size);
for (start = i = 0; Pword[i]; start = i)
if (isspace(Pword[i])) {
- while (Pword[++i] && isspace(Pword[i]));
+ while (Pword[++i] && isspace(Pword[i])) ;
Html_process_space(html, Pword + start, i - start);
} else {
- while (Pword[++i] && !isspace(Pword[i]));
+ while (Pword[++i] && !isspace(Pword[i])) ;
ch = Pword[i];
Pword[i] = 0;
DW2TB(html->dw)->addText(Pword, S_TOP(html)->style);
@@ -1209,7 +1209,7 @@ static void Html_process_word(DilloHtml *html, const char *word, int size)
Pword = a_Html_parse_entities(html, word, size);
for (i = 0; Pword[i]; ++i)
if (strchr("\t\f\n\r", Pword[i]))
- for (j = i; (Pword[j] = Pword[j+1]); ++j);
+ for (j = i; (Pword[j] = Pword[j+1]); ++j) ;
DW2TB(html->dw)->addText(Pword, S_TOP(html)->style);
dFree(Pword);
@@ -1331,8 +1331,8 @@ static void Html_tag_cleanup_at_close(DilloHtml *html, int TagIdx)
(cmp = (new_idx != html->stack->getRef(stack_idx)->tag_idx)) &&
((w3c_mode &&
Tags[html->stack->getRef(stack_idx)->tag_idx].EndTag == 'O') ||
- (!w3c_mode &&
- (Tags[html->stack->getRef(stack_idx)->tag_idx].EndTag == 'O') ||
+ ((!w3c_mode &&
+ (Tags[html->stack->getRef(stack_idx)->tag_idx].EndTag == 'O')) ||
Tags[html->stack->getRef(stack_idx)->tag_idx].TagLevel <
Tags[new_idx].TagLevel))) {
--stack_idx;
@@ -1516,7 +1516,7 @@ static void Html_parse_doctype(DilloHtml *html, const char *tag, int tagsize)
* and replace '\n' and '\r' with ' ' inside quoted strings. */
for (i = 0, p = ntag; *p; ++p) {
if (isspace(*p)) {
- for (ntag[i++] = ' '; isspace(p[1]); ++p);
+ for (ntag[i++] = ' '; isspace(p[1]); ++p) ;
} else if ((quote = *p) == '"' || *p == '\'') {
for (ntag[i++] = *p++; (ntag[i++] = *p) && *p != quote; ++p) {
if (*p == '\n' || *p == '\r')
@@ -2945,7 +2945,7 @@ static void Html_tag_open_meta(DilloHtml *html, const char *tag, int tagsize)
sprintf(delay_str, ".");
/* Skip to anything after "URL=" */
- while (*content && *(content++) != '=');
+ while (*content && *(content++) != '=') ;
/* Send a custom HTML message.
* TODO: This is a hairy hack,
@@ -3766,7 +3766,7 @@ static int Html_write_raw(DilloHtml *html, char *buf, int bufsize, int Eof)
if (isspace(buf[buf_index])) {
/* whitespace: group all available whitespace */
- while (++buf_index < bufsize && isspace(buf[buf_index]));
+ while (++buf_index < bufsize && isspace(buf[buf_index])) ;
Html_process_space(html, buf + token_start, buf_index - token_start);
token_start = buf_index;
diff --git a/src/uicmd.cc b/src/uicmd.cc
index e315417e..c093f73e 100644
--- a/src/uicmd.cc
+++ b/src/uicmd.cc
@@ -85,11 +85,12 @@ public:
void remove (Widget *w) {
TabGroup::remove (w);
/* fixup resizable in case we just removed it */
- if (resizable () == w)
+ if (resizable () == w) {
if (children () > 0)
resizable (child (children () - 1));
else
resizable (NULL);
+ }
if (children () < 2)
hideLabels ();
diff --git a/src/url.h b/src/url.h
index 32b173e6..02e89539 100644
--- a/src/url.h
+++ b/src/url.h
@@ -95,12 +95,12 @@ extern "C" {
struct _DilloUrl {
Dstr *url_string;
const char *buffer;
- const char *scheme; //
- const char *authority; //
- const char *path; // These are references only
- const char *query; // (no need to free them)
- const char *fragment; //
- const char *hostname; //
+ const char *scheme; /**/
+ const char *authority; /**/
+ const char *path; /* These are references only */
+ const char *query; /* (no need to free them) */
+ const char *fragment; /**/
+ const char *hostname; /**/
int port;
int flags;
Dstr *data; /* POST */