commit - ef0b17aa7b1ff2b4dd0c2ee7b2e28eb5cd3b47c8
commit + ef20f542049f5928fa256eb470801089d0b1048b
blob - 328c4a1e1795d88a1e53519b52ad67b9e682f85a
blob + ef99224d337170364b2e5458bf6e2a3206c3e05a
--- Makefile.inc
+++ Makefile.inc
LIBEXECDIR ?= ${PREFIX}/libexec
MANDIR ?= ${PREFIX}/man/man
.else
-CFLAGS += -Werror -Wall -Wstrict-prototypes -Wunused-variable
+CFLAGS += -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS += -Wunused-variable
PREFIX ?= ${HOME}
BINDIR ?= ${PREFIX}/bin
LIBEXECDIR ?= ${BINDIR}
blob - 60476351c5599bd9549cccf48000ca54c8e8964e
blob + 64e9211906bb2f24ea99ab4711625da3df5aa9cb
--- got/got.c
+++ got/got.c
exit(1);
}
-int
+static int
spawn_editor(const char *editor, const char *file)
{
pid_t pid;
int verbosity;
};
-void
+static void
print_update_progress_stats(struct got_update_progress_arg *upa)
{
if (!upa->did_something)
* if the work tree was updated. This function should be used by any operation
* which merges changes into the work tree without updating the work tree.
*/
-void
+static void
print_merge_progress_stats(struct got_update_progress_arg *upa)
{
if (!upa->did_something)
exit(1);
}
-void
+static void
trim_logmsg(char *logmsg, int limit)
{
char *nl;
return err;
}
-void
+static void
histedit_free_list(struct got_histedit_list *histedit_cmds)
{
struct got_histedit_list_entry *hle;
blob - dac1eae40679c47137747bc4f1d9aa0f054e8f59
blob + 9ae9b6d5b2c163cd71dd4d6c284eeb75e027fb1a
--- gotweb/parse.y
+++ gotweb/parse.y
};
int symset(const char *, const char *, int);
+int cmdline_symset(char *);
char *symget(const char *);
const struct got_error* gerror = NULL;
blob - 899aa6d794f3ba3c31ebdd4cacb8b17edd059d9f
blob + a4c18d064bd644c6fd5c1a0b49fb88bcdb340def
--- lib/dial.c
+++ lib/dial.c
#include "got_compat.h"
#include "got_lib_dial.h"
+#include "got_dial.h"
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
blob - 11768b2c060a299839ae3a716d85f9324d6ce579
blob + e84f689c1bd00b38b2adcb0b972599dba7eec582
--- lib/diff_main.c
+++ lib/diff_main.c
return diff_state_add_solved_chunk(state, &chunk);
}
-void
+static void
diff_data_init_root(struct diff_data *d, FILE *f, const uint8_t *data,
unsigned long long len, int diff_flags)
{
return DIFF_RC_OK;
}
-int
+static int
diff_run_algo(const struct diff_algo_config *algo_config,
struct diff_state *state)
{
blob - abcbc8d0355b6f45e427bb4374f6b94fc5c3d7f4
blob + a06df2c36c9d8cb203803661ff563e969a584e88
--- lib/diff_patience.c
+++ lib/diff_patience.c
/* Use an optimized sorting algorithm (qsort, mergesort) to find unique lines */
-int diff_atoms_compar(const void *_a, const void *_b)
+static int diff_atoms_compar(const void *_a, const void *_b)
{
const struct diff_atom *a = *(struct diff_atom**)_a;
const struct diff_atom *b = *(struct diff_atom**)_b;
blob - bbbf920360215773ac2f4f979efd72d2e5f2d742
blob + efa4991b9e207e7ed8f7a422e5c83f5cd79b69b4
--- lib/fileindex.c
+++ lib/fileindex.c
return err;
}
-void
+static void
free_dirlist(struct got_pathlist_head *dirlist)
{
struct got_pathlist_entry *dle;
blob - f284020602937db76c3bdc3f41457af32264ac4f
blob + 162adf613a914f48646e2c282878578a1c726c19
--- lib/gotconfig.c
+++ lib/gotconfig.c
#include "got_lib_privsep.h"
#include "got_lib_gotconfig.h"
+#include "got_gotconfig.h"
+
const struct got_error *
got_gotconfig_read(struct got_gotconfig **conf, const char *gotconfig_path)
{
blob - d611821e6302999ac110d3b018fd2187899c7436
blob + b4a0b763969633b6075afe7960a4a01da96d421e
--- lib/object.c
+++ lib/object.c
return got_privsep_recv_tree(tree, ibuf);
}
-const struct got_error *
+static const struct got_error *
read_tree_privsep(struct got_tree_object **tree, int obj_fd,
struct got_object_id *id, struct got_repository *repo)
{
blob - 6eec96582b7d29118c2f757bdb1e828656a52cca
blob + 90121b5eb76e85d855091c03ad5c7b2e3b37054e
--- lib/object_cache.c
+++ lib/object_cache.c
return NULL;
}
-size_t
+static size_t
get_size_obj(struct got_object *obj)
{
size_t size = sizeof(*obj);
return size;
}
-size_t
+static size_t
get_size_tree(struct got_tree_object *tree)
{
size_t size = sizeof(*tree);
return size;
}
-size_t
+static size_t
get_size_commit(struct got_commit_object *commit)
{
size_t size = sizeof(*commit);
return size;
}
-size_t
+static size_t
get_size_tag(struct got_tag_object *tag)
{
size_t size = sizeof(*tag);
return size;
}
-size_t
+static size_t
get_size_raw(struct got_raw_object *raw)
{
return sizeof(*raw);
blob - 4065f5b1391cd57bc92ee6e07e70920e57f016ef
blob + 87e3158a38d75521cf4c032fb893550039a3683e
--- lib/object_create.c
+++ lib/object_create.c
#include "got_lib_object.h"
#include "got_lib_object_parse.h"
#include "got_lib_lockfile.h"
+
+#include "got_lib_object_create.h"
#ifndef nitems
#define nitems(_a) (sizeof(_a) / sizeof((_a)[0]))
blob - b772646b72dad6b735412e58c407030184994838
blob + 8ebcec37cc5884e4fd3f5f0986dee830277e39c8
--- lib/pack_create.c
+++ lib/pack_create.c
return err;
}
-const struct got_error *
+static const struct got_error *
hwrite(FILE *f, void *buf, off_t len, SHA1_CTX *ctx)
{
size_t n;
return NULL;
}
-const struct got_error *
+static const struct got_error *
hcopy(FILE *fsrc, FILE *fdst, off_t len, SHA1_CTX *ctx)
{
unsigned char buf[65536];
return NULL;
}
-const struct got_error *
+static const struct got_error *
hcopy_mmap(uint8_t *src, off_t src_offset, size_t src_size,
FILE *fdst, off_t len, SHA1_CTX *ctx)
{
blob - d1f32d25f13065c1f79bf94d00db6212ad460558
blob + eee49ec5ceec50d6d9ca6892a0641f9ae82608ff
--- lib/path.c
+++ lib/path.c
while (*path == '/')
path++;
return (*path == '\0');
-}
-
-int
-got_path_is_current_dir(const char *path)
-{
- return (path[0] == '.' && path[1] == '\0');
}
int
blob - b9ef91ba3083180edcfef203a56a0a06f4273b2b
blob + a845118f6e6f64c5061dd5eef11341341e9ad2ff
--- lib/pkt.c
+++ lib/pkt.c
#include <unistd.h>
#include "got_error.h"
+#include "got_lib_pkt.h"
const struct got_error *
got_pkt_readn(ssize_t *off, int fd, void *buf, size_t n)
blob - 4e1d32e818775cf3bc4998760888e27f4370487f
blob + 6798aec8479802608cc62a91e461e5b113c80e33
--- lib/privsep.c
+++ lib/privsep.c
#include "got_lib_object_parse.h"
#include "got_lib_privsep.h"
#include "got_lib_pack.h"
+
+#include "got_privsep.h"
#ifndef MIN
#define MIN(_a,_b) ((_a) < (_b) ? (_a) : (_b))
blob - 1ead68d8ef23d037e71df862ec8e81b3b66610b0
blob + 9e8ef346fc31e5275d6c78d54e556c1c8941f531
--- lib/worktree.c
+++ lib/worktree.c
ie->path, &blob_id, NULL, &commit_id, -1, NULL);
}
-void
+static void
free_ignorelist(struct got_pathlist_head *ignorelist)
{
struct got_pathlist_entry *pe;
got_pathlist_free(ignorelist);
}
-void
+static void
free_ignores(struct got_pathlist_head *ignores)
{
struct got_pathlist_entry *pe;
return err;
}
-int
+static int
match_ignores(struct got_pathlist_head *ignores, const char *path)
{
struct got_pathlist_entry *pe;
return err;
}
-const struct got_error *
+static const struct got_error *
commit_worktree(struct got_object_id **new_commit_id,
struct got_pathlist_head *commitable_paths,
struct got_object_id *head_commit_id,
return err;
}
-const struct got_error *
+static const struct got_error *
create_backup_ref(const char *backup_ref_prefix, struct got_reference *branch,
struct got_object_id *new_commit_id, struct got_repository *repo)
{
int have_changes;
};
-const struct got_error *
+static const struct got_error *
check_stage_ok(void *arg, unsigned char status,
unsigned char staged_status, const char *relpath,
struct got_object_id *blob_id, struct got_object_id *staged_blob_id,
blob - 756c326f7d619cfaaa0c5825f8b254e67e6ad4b7
blob + 5030c3f38d4701f0b3d9f9ae5870ffda6d0826b1
--- libexec/got-read-gotconfig/parse.y
+++ libexec/got-read-gotconfig/parse.y
};
int symset(const char *, const char *, int);
+int cmdline_symset(char *);
char *symget(const char *);
static int atoul(char *, u_long *);
blob - 62e7bd4abb455803dad6f0701238c9271478d349
blob + d67081715f628dd92add8cfb5bb5cf950f5dcf87
--- regress/fetch/fetch_test.c
+++ regress/fetch/fetch_test.c
static int verbose;
static int quiet;
-void
+static void
test_printf(char *fmt, ...)
{
va_list ap;
if (!quiet) printf("test_%s %s\n", (name), test_ok ? "ok" : "failed"); \
failure = (failure || !test_ok); }
-void
+static void
usage(void)
{
fprintf(stderr, "usage: fetch_test [-v] [-q]\n");
blob - 429beb1d097c7200262558eb58712cbbc04591b4
blob + 0bed4066576cbb226b23d43fc5c6d18a1e16a9e9
--- regress/idset/idset_test.c
+++ regress/idset/idset_test.c
static int verbose;
static int quiet;
-void
-test_printf(char *fmt, ...)
-{
- va_list ap;
-
- if (!verbose)
- return;
-
- va_start(ap, fmt);
- vprintf(fmt, ap);
- va_end(ap);
-}
-
static const char *id_str1 = "1111111111111111111111111111111111111111";
static const char *id_str2 = "2222222222222222222222222222222222222222";
static const char *id_str3 = "ffffffffffffffffffffffffffffffffffffffff";
if (!quiet) printf("test_%s %s\n", (name), test_ok ? "ok" : "failed"); \
failure = (failure || !test_ok); }
-void
+static void
usage(void)
{
fprintf(stderr, "usage: id_test [-v] [-q]\n");
blob - 425a9edc3c68e6b156add5769aa1cc51cde35345
blob + f1e809c24d6f539ddb632ad6655346337a07215d
--- regress/path/path_test.c
+++ regress/path/path_test.c
static int verbose;
static int quiet;
-void
+static void
test_printf(char *fmt, ...)
{
va_list ap;
if (!quiet) printf("test_%s %s\n", (name), test_ok ? "ok" : "failed"); \
failure = (failure || !test_ok); }
-void
+static void
usage(void)
{
fprintf(stderr, "usage: path_test [-v] [-q]\n");
blob - 2b9004eea994cbc9766982dc6b84bdf43d145ed1
blob + 727754759324b49fe4b4ef652fc8680080c64745
--- tog/tog.c
+++ tog/tog.c
}
}
-struct tog_color *
+static struct tog_color *
get_color(struct tog_colors *colors, int colorpair)
{
struct tog_color *tc = NULL;
return err;
}
-void
+static void
view_vborder(struct tog_view *view)
{
PANEL *panel;
got_locale_is_utf8() ? ACS_VLINE : '|', view->nlines);
}
-int
+static int
view_needs_focus_indication(struct tog_view *view)
{
if (view_is_parent_view(view)) {
return regexec(regex, line, nmatch, regmatch, 0) == 0;
}
-struct tog_color *
+static struct tog_color *
match_color(struct tog_colors *colors, const char *line)
{
struct tog_color *tc = NULL;
return NULL;
}
-void
+static void
ref_view_free_refs(struct tog_ref_view_state *s)
{
struct tog_reflist_entry *re;