diff options
-rw-r--r-- | dillorc | 2 | ||||
-rw-r--r-- | dw/textblock.cc | 14 | ||||
-rw-r--r-- | lout/misc.hh | 14 | ||||
-rw-r--r-- | src/IO/http.c | 6 | ||||
-rw-r--r-- | src/url.c | 6 |
5 files changed, 25 insertions, 17 deletions
@@ -21,7 +21,7 @@ # Change this if you want background images to be loaded initially. # (While browsing, this can be changed from the tools/settings menu.) -#load_background_images=FALSE +#load_background_images=NO # Change this if you want to disable loading of CSS stylesheets initially. # (While browsing, this can be changed from the tools/settings menu.) diff --git a/dw/textblock.cc b/dw/textblock.cc index cfdb31e0..11bfdc0c 100644 --- a/dw/textblock.cc +++ b/dw/textblock.cc @@ -2567,19 +2567,9 @@ void Textblock::breakAdded () // actual width (Word::totalWidth) would include the space, so that // the width of the line is larger than the available width. - // Casting words->size() to long avoids the compiler warning - // - // "assuming signed overflow does not occur when assuming that - // (X - c) > X is always false [-Wstrict-overflow]" - // - // With long, the assumtion (X - c) > X (with X = words->size() and - // c = 2) is indeed always false. - // - // Let me know if you know a better solution. --SG - if (words->size () >= 2) - words->getRef((long)words->size () - 2)->origSpace = - words->getRef((long)words->size () - 2)->effSpace = 0; + words->getRef(words->size () - 2)->origSpace = + words->getRef(words->size () - 2)->effSpace = 0; } /** diff --git a/lout/misc.hh b/lout/misc.hh index 4c20208a..cac3da77 100644 --- a/lout/misc.hh +++ b/lout/misc.hh @@ -437,7 +437,19 @@ public: assert (i >= 0); return this->arrayMain + i; } else if (i >= this->startExtra + this->numExtra) { - assert (i < this->numMain + this->numExtra); + // The original assertion + /// + // "assert (i < this->numMain + this->numExtra)" + // + // causes this warnung in dw::Textblock::breakAdded: + // + // "assuming signed overflow does not occur when assuming that + // (X - c) > X is always false [-Wstrict-overflow]" + // + // Subtracting numExtra from both sides solves this, + // interrestingly. + + assert (i - this->numExtra < this->numMain); return this->arrayMain + i - this->numExtra; } else return this->arrayExtra1 + i - this->startExtra; diff --git a/src/IO/http.c b/src/IO/http.c index 1be94e0d..8c7dcef1 100644 --- a/src/IO/http.c +++ b/src/IO/http.c @@ -189,7 +189,7 @@ static void Http_connect_queued_sockets(HostConnection_t *hc) a_Chain_fcb(OpSend, sd->Info, &sd->SockFD, "FD"); Http_send_query(sd->Info, sd); sd->connected_to = hc->host; - dList_append(hc->active_fds, (void *)sd->SockFD); + dList_append(hc->active_fds, INT2VOIDP(sd->SockFD)); } } } @@ -214,7 +214,7 @@ static void Http_socket_free(int SKey) } else { if (S->connected_to) { HostConnection_t *hc = Http_host_connection_get(S->connected_to); - dList_remove_fast(hc->active_fds, (void *)S->SockFD); + dList_remove_fast(hc->active_fds, INT2VOIDP(S->SockFD)); Http_connect_queued_sockets(hc); if (dList_length(hc->active_fds) == 0) Http_host_connection_remove(hc); @@ -728,7 +728,7 @@ void a_Http_ccc(int Op, int Branch, int Dir, ChainLink *Info, case OpSend: if (Data2) { if (!strcmp(Data2, "FD")) { - Info->LocalKey = (void *)*(int*)Data1; + Info->LocalKey = INT2VOIDP(*(int*)Data1); a_Chain_bcb(OpSend, Info, Data1, Data2); } else if (!strcmp(Data2, "reply_complete")) { int fd = VOIDP2INT(Info->LocalKey); @@ -691,6 +691,12 @@ static uint_t Url_host_public_internal_dots(const char *host) * in February 2014 and picking out those where it was simplest for * them to describe the situation by beginning with a "*.[tld]" rule * or every rule was "[something].[tld]". + * + * TODO: Consider the old publicsuffix code again. This TLD list has + * shrunk and shrunk over the years, and has become a poorer and + * poorer approximation of administrative boundaries -- and, as of + * mid-2014, even NZ and UK are allowing domains to be registered + * at the second level, which doesn't leave much. */ const char *const tlds[] = {"bd","bn","ck","cy","er","et","fj","fk", "gu","il","jm","ke","kh","kw","mm","mz", |