Gitweb links:

...log 
http://git.netsurf-browser.org/netsurf.git/shortlog/c1aec1cfa0d5fa64dff2d177800797d7e3d8c15c
...commit 
http://git.netsurf-browser.org/netsurf.git/commit/c1aec1cfa0d5fa64dff2d177800797d7e3d8c15c
...tree 
http://git.netsurf-browser.org/netsurf.git/tree/c1aec1cfa0d5fa64dff2d177800797d7e3d8c15c

The branch, master has been updated
       via  c1aec1cfa0d5fa64dff2d177800797d7e3d8c15c (commit)
      from  05d2b9a92cd718a38aed647400159c6c40a743d2 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commitdiff 
http://git.netsurf-browser.org/netsurf.git/commit/?id=c1aec1cfa0d5fa64dff2d177800797d7e3d8c15c
commit c1aec1cfa0d5fa64dff2d177800797d7e3d8c15c
Author: Vincent Sanders <[email protected]>
Commit: Vincent Sanders <[email protected]>

    fix urldb warning and test build

diff --git a/content/urldb.c b/content/urldb.c
index add0e4b..3525492 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -1346,7 +1346,8 @@ static void urldb_dump_search(struct search_node *parent, 
int depth)
        int i; /* index into string */
        char s[1024];
        int r;
-
+       int sl = sizeof(s) - 2;
+       
        if (parent == &empty)
                return;
 
@@ -1358,8 +1359,8 @@ static void urldb_dump_search(struct search_node *parent, 
int depth)
 
        for (h = parent->data; h; h = h->parent) {
                if (h->part) {
-                       r = snprintf(&s[i], (sizeof(s) - 2) - i, "%s", h->part);
-                       if ((i + r) > (sizeof(s) - 2)) {
+                       r = snprintf(&s[i], sl - i, "%s", h->part);
+                       if ((i + r) > sl) {
                                break;
                        }
                        i += r;
diff --git a/test/Makefile b/test/Makefile
index 6bc037c..0253f4d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -11,7 +11,7 @@ nsurl_SRCS := utils/corestrings.c utils/nsurl.c utils/idna.c \
 urldbtest_SRCS := content/urldb.c \
                utils/idna.c utils/bloom.c utils/nsoption.c utils/nsurl.c \
                utils/corestrings.c \
-               utils/hashtable.c utils/messages.c utils/utils.c \
+               utils/hashtable.c utils/messages.c utils/time.c utils/utils.c \
                test/log.c test/urldbtest.c
 
 # low level cache sources
@@ -85,8 +85,15 @@ endef
 
 $(eval $(call pkg_cfg_detect_lib,check,Check))
 
+COMMON_WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-align \
+       -Wwrite-strings -Wmissing-declarations -Wuninitialized
 
-TESTCFLAGS := -std=c99 -g -Wall \
+ifneq ($(CC_MAJOR),2)
+  COMMON_WARNFLAGS += -Wno-unused-parameter
+endif
+
+TESTCFLAGS := -std=c99 -g \
+               $(COMMON_WARNFLAGS) \
                -D_BSD_SOURCE \
                -D_POSIX_C_SOURCE=200809L \
                -D_XOPEN_SOURCE=600 \


-----------------------------------------------------------------------

Summary of changes:
 content/urldb.c |    7 ++++---
 test/Makefile   |   11 +++++++++--
 2 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/content/urldb.c b/content/urldb.c
index add0e4b..3525492 100644
--- a/content/urldb.c
+++ b/content/urldb.c
@@ -1346,7 +1346,8 @@ static void urldb_dump_search(struct search_node *parent, 
int depth)
        int i; /* index into string */
        char s[1024];
        int r;
-
+       int sl = sizeof(s) - 2;
+       
        if (parent == &empty)
                return;
 
@@ -1358,8 +1359,8 @@ static void urldb_dump_search(struct search_node *parent, 
int depth)
 
        for (h = parent->data; h; h = h->parent) {
                if (h->part) {
-                       r = snprintf(&s[i], (sizeof(s) - 2) - i, "%s", h->part);
-                       if ((i + r) > (sizeof(s) - 2)) {
+                       r = snprintf(&s[i], sl - i, "%s", h->part);
+                       if ((i + r) > sl) {
                                break;
                        }
                        i += r;
diff --git a/test/Makefile b/test/Makefile
index 6bc037c..0253f4d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -11,7 +11,7 @@ nsurl_SRCS := utils/corestrings.c utils/nsurl.c utils/idna.c \
 urldbtest_SRCS := content/urldb.c \
                utils/idna.c utils/bloom.c utils/nsoption.c utils/nsurl.c \
                utils/corestrings.c \
-               utils/hashtable.c utils/messages.c utils/utils.c \
+               utils/hashtable.c utils/messages.c utils/time.c utils/utils.c \
                test/log.c test/urldbtest.c
 
 # low level cache sources
@@ -85,8 +85,15 @@ endef
 
 $(eval $(call pkg_cfg_detect_lib,check,Check))
 
+COMMON_WARNFLAGS = -W -Wall -Wundef -Wpointer-arith -Wcast-align \
+       -Wwrite-strings -Wmissing-declarations -Wuninitialized
 
-TESTCFLAGS := -std=c99 -g -Wall \
+ifneq ($(CC_MAJOR),2)
+  COMMON_WARNFLAGS += -Wno-unused-parameter
+endif
+
+TESTCFLAGS := -std=c99 -g \
+               $(COMMON_WARNFLAGS) \
                -D_BSD_SOURCE \
                -D_POSIX_C_SOURCE=200809L \
                -D_XOPEN_SOURCE=600 \


-- 
NetSurf Browser

_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org

Reply via email to