commit - 640cd7ff31ef05df4f6394c8792925b7dd0b8c7c
commit + 336075a42a5ae0fa322db734c481d21998e82bb8
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 - 98f3281d5becb5173121e9f4f0b74eee3b61bebf
blob + 79d2837a85b78836e571782fcb582caecb77e697
--- 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 - 096f0320a2c1debb9a1de9ac9c0a8e2bbab704cd
blob + 4f688a96c44c72c60f3157e3d1293fcca25111c6
--- lib/dial.c
+++ lib/dial.c
#include "got_path.h"
#include "got_lib_dial.h"
+#include "got_dial.h"
#ifndef nitems
#define nitems(_a) (sizeof((_a)) / sizeof((_a)[0]))
blob - 77f774c3d3737b31b6f815a4434406dd96458a69
blob + dd83abd4cdf8024f27f362b535f73b9a965c0073
--- 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 - b05a8137d02606a3c4fee8f04809b0ac5cd71e8d
blob + 52947dd222fcda2c7cb0b987113304a68bb33445
--- lib/fileindex.c
+++ lib/fileindex.c
return err;
}
-void
+static void
free_dirlist(struct got_pathlist_head *dirlist)
{
struct got_pathlist_entry *dle;
blob - ab884984fe1018932f9071e31e6880538386570d
blob + 5b602c9f5513aee64b98ca608535d5b85280ec42
--- 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 - f39d1d87d659236f80c05f15876b571c2e27febf
blob + 7a1fbe3ab0e107d0ec9075abdf9379a3b9de0071
--- 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 - 644fb1ad06904cfc5d4c57cd3db0c88cd97119ea
blob + 6ed62392ac8837da1d05604c313f32b82d0d4d7c
--- 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 - a3ad6737a9675482940881b8c700cfd61cb68e29
blob + 5036de1b9a6b491a1fc7c0358a03dcd9574f6cf3
--- 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 - 2e6d5f071a005d22724536b529a844122de2155f
blob + 2b957c17029c594fc2791494cf62d176ad552645
--- 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 - f4b3d337163db35814aa20bf256f110b9febeb41
blob + 19dc9c983445c68dbea181cf6bfabcfd1ee9d949
--- 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 - ce17d48b6a8e1d25bb31f00aae6c63b3b8bdddc7
blob + 70eb167c5ee71b29c045bdae0de5c7b7859403f7
--- 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 - 0fefe7552a676b9488741693766a6ec76dcacf60
blob + ae1ce6d136c77ab98e72f28c8a75c47893044c9b
--- 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 - 1c790b2db1b1ff2264cbe8535dda3cd449e7753f
blob + b9a0bd38cabe5d893cbbb04c482578a895a094ed
--- 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 - 5077275c15513b4be193788a5f50ce0fff48b24a
blob + 9d84105f23ebcedee81341088dc0fd38cb0c4261
--- 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 - 64c131e2e42815b06f5e84d8179dd9244cee3c1f
blob + 920e69e004d588ab238d738e0915a89dc67bf9eb
--- 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 - 76b5b1f6f53409fd36f72543864785faa2adb4bc
blob + e8001a520fd4f5763bc38dbfb1c94be3fdd0e531
--- 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 - 06a2c43c08564378df49023a7b6ae4bdb8a9e22a
blob + 130c0adbc42fe5cc0b9da84738637b1ff735e325
--- 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;