On Sat, Mar 07, 2015 at 06:35:10PM -0500, Todd Zullinger wrote:
> John Keeping wrote:
> > I still think we can't rely on `gpg --recv-keys` though, we would
> > have to distribute the key with CGit and possible also do something
> > to avoid importing it into the user's keyring by default.
>
> If
Sparse says things like:
warning: non-ANSI function declaration of function 'calc_ttl'
Signed-off-by: John Keeping
---
cgit.c| 2 +-
filter.c | 2 +-
ui-diff.c | 2 +-
ui-refs.c | 4 ++--
ui-repolist.c | 6 +++---
ui-shared.c | 12 ++--
ui-ssdiff.c
Sparse[0] detects several potential problems in CGit, which are all
fixed by this set of patches. Most of these are style issues that are
correct either way (using integer zero as a NULL pointer), but I think
there is value in keeping the build clean of Sparse warnings.
[0] https://sparse.wiki.k
Signed-off-by: John Keeping
---
Makefile | 3 +++
cgit.mk | 9 -
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index ed329e8..42ed230 100644
--- a/Makefile
+++ b/Makefile
@@ -68,6 +68,9 @@ all:: cgit
cgit:
$(QUIET_SUBDIR0)git $(QUIET_SUBDIR1)
Bitfields are only defined for unsigned types.
Detected by sparse.
Signed-off-by: John Keeping
---
ui-blob.c | 4 ++--
ui-diff.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ui-blob.c b/ui-blob.c
index a025bca..388a017 100644
--- a/ui-blob.c
+++ b/ui-blob.c
@@ -14,8 +1
These are not used outside this file and are not declared.
Signed-off-by: John Keeping
---
scan-tree.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scan-tree.c b/scan-tree.c
index e900ad9..8e3cf52 100644
--- a/scan-tree.c
+++ b/scan-tree.c
@@ -45,8 +45,8 @@ out:
These are not used outside this file and are not declared.
Signed-off-by: John Keeping
---
ui-log.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui-log.c b/ui-log.c
index 1b60591..32b4c47 100644
--- a/ui-log.c
+++ b/ui-log.c
@@ -12,7 +12,7 @@
#include "ui-shared.h"
#incl
These are not used outside this file and are not declared.
Signed-off-by: John Keeping
---
shared.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/shared.c b/shared.c
index ae17d78..a99173b 100644
--- a/shared.c
+++ b/shared.c
@@ -284,8 +284,8 @@ static int load_mmfile(m
Signed-off-by: John Keeping
---
cache.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cache.c b/cache.c
index 900b161..cd99812 100644
--- a/cache.c
+++ b/cache.c
@@ -411,7 +411,7 @@ int cache_ls(const char *path)
DIR *dir;
struct dirent *ent;
int err
These are not used outside this file and are not declared; they are also
never modified.
Signed-off-by: John Keeping
---
ui-repolist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ui-repolist.c b/ui-repolist.c
index a6d0321..2453a7f 100644
--- a/ui-repolist.c
+++ b/ui-
Signed-off-by: John Keeping
---
ui-shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui-shared.c b/ui-shared.c
index 1e3c131..7bcb8d3 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -119,7 +119,7 @@ char *cgit_fileurl(const char *reponame, const char
*pagename,
char *cg
Sparse complains about this table because we use the integer zero as the
NULL pointer. Use this as an opportunity to reformat the table so that
it always contains 8 elements per row, making it easier to see which
values are being set and which are not.
Signed-off-by: John Keeping
---
html.c | 5
This is not used outside this file and is not declared.
Signed-off-by: John Keeping
---
ui-shared.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui-shared.c b/ui-shared.c
index 6d3cfa9..d4c4bb9 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -11,7 +11,7 @@
#include "cmd.h"
These definitions should not be modified (and never are) so we can move
them to .rodata.
Signed-off-by: John Keeping
---
ui-stats.c | 14 +++---
ui-stats.h | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ui-stats.c b/ui-stats.c
index a264f6a..9cd8247 100644
--- a/
Sparse complains that we are using a plain integer as a NULL pointer
here, but in fact we do not have to specify a value for this variable at
all since it has static storage duration and thus will be initialized to
NULL by the compiler.
Signed-off-by: John Keeping
---
ui-shared.c | 2 +-
1 file
15 matches
Mail list logo