summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 36adb4a)
raw | patch | inline | side by side (parent: 36adb4a)
author | Benjamin Kramer <benny.kra@googlemail.com> | |
Sat, 7 Mar 2009 20:02:10 +0000 (21:02 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 8 Mar 2009 04:52:17 +0000 (20:52 -0800) |
These variables were unused and can be removed safely:
builtin-clone.c::cmd_clone(): use_local_hardlinks, use_separate_remote
builtin-fetch-pack.c::find_common(): len
builtin-remote.c::mv(): symref
diff.c::show_stats():show_stats(): total
diffcore-break.c::should_break(): base_size
fast-import.c::validate_raw_date(): date, sign
fsck.c::fsck_tree(): o_sha1, sha1
xdiff-interface.c::parse_num(): read_some
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c::cmd_clone(): use_local_hardlinks, use_separate_remote
builtin-fetch-pack.c::find_common(): len
builtin-remote.c::mv(): symref
diff.c::show_stats():show_stats(): total
diffcore-break.c::should_break(): base_size
fast-import.c::validate_raw_date(): date, sign
fsck.c::fsck_tree(): o_sha1, sha1
xdiff-interface.c::parse_num(): read_some
Signed-off-by: Benjamin Kramer <benny.kra@googlemail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-clone.c | patch | blob | history | |
builtin-fetch-pack.c | patch | blob | history | |
builtin-remote.c | patch | blob | history | |
diff.c | patch | blob | history | |
diffcore-break.c | patch | blob | history | |
fast-import.c | patch | blob | history | |
fsck.c | patch | blob | history | |
xdiff-interface.c | patch | blob | history |
diff --git a/builtin-clone.c b/builtin-clone.c
index c338910b1c76f3c994e4a22c9c0a1da38843e050..92826cd14c5df6b216b4f50bd80facd061b58ef9 100644 (file)
--- a/builtin-clone.c
+++ b/builtin-clone.c
int cmd_clone(int argc, const char **argv, const char *prefix)
{
- int use_local_hardlinks = 1;
- int use_separate_remote = 1;
int is_bundle = 0;
struct stat buf;
const char *repo_name, *repo, *work_tree, *git_dir;
if (argc == 0)
die("You must specify a repository to clone.");
- if (option_no_hardlinks)
- use_local_hardlinks = 0;
-
if (option_mirror)
option_bare = 1;
die("--bare and --origin %s options are incompatible.",
option_origin);
option_no_checkout = 1;
- use_separate_remote = 0;
}
if (!option_origin)
diff --git a/builtin-fetch-pack.c b/builtin-fetch-pack.c
index 67fb80ec48d6d8f0327628afd86fb366d8f97617..c2e5adc8847e8ffa94bd009121b7a295f3f0512e 100644 (file)
--- a/builtin-fetch-pack.c
+++ b/builtin-fetch-pack.c
if (args.depth > 0) {
char line[1024];
unsigned char sha1[20];
- int len;
- while ((len = packet_read_line(fd[0], line, sizeof(line)))) {
+ while (packet_read_line(fd[0], line, sizeof(line))) {
if (!prefixcmp(line, "shallow ")) {
if (get_sha1_hex(line + 8, sha1))
die("invalid shallow line: %s", line);
diff --git a/builtin-remote.c b/builtin-remote.c
index ac69d37c8af415a64cba88a888e9b80db95ef97a..e171096ece8cd041f7e6a08ca80af444786b50cc 100644 (file)
--- a/builtin-remote.c
+++ b/builtin-remote.c
struct string_list_item *item = remote_branches.items + i;
int flag = 0;
unsigned char sha1[20];
- const char *symref;
- symref = resolve_ref(item->string, sha1, 1, &flag);
+ resolve_ref(item->string, sha1, 1, &flag);
if (!(flag & REF_ISSYMREF))
continue;
if (delete_ref(item->string, NULL, REF_NODEREF))
index 3feca1b1732c506b1c0990c489a3a0ee37078edb..e06c93707f0a7e6523fdf5f175232d65d4a0b62a 100644 (file)
--- a/diff.c
+++ b/diff.c
static void show_stats(struct diffstat_t* data, struct diff_options *options)
{
- int i, len, add, del, total, adds = 0, dels = 0;
+ int i, len, add, del, adds = 0, dels = 0;
int max_change = 0, max_len = 0;
int total_files = data->nr;
int width, name_width;
*/
add = added;
del = deleted;
- total = add + del;
adds += add;
dels += del;
if (width <= max_change) {
add = scale_linear(add, width, max_change);
del = scale_linear(del, width, max_change);
- total = add + del;
}
show_name(options->file, prefix, name, len, reset, set);
fprintf(options->file, "%5d%s", added + deleted,
diff --git a/diffcore-break.c b/diffcore-break.c
index 31cdcfe8bcdae7df65b0387071846299a14bb7be..d7097bb576cef8900e8e0218ba82e1cc7a87a567 100644 (file)
--- a/diffcore-break.c
+++ b/diffcore-break.c
* The value we return is 1 if we want the pair to be broken,
* or 0 if we do not.
*/
- unsigned long delta_size, base_size, max_size;
+ unsigned long delta_size, max_size;
unsigned long src_copied, literal_added, src_removed;
*merge_score_p = 0; /* assume no deletion --- "do not break"
if (diff_populate_filespec(src, 0) || diff_populate_filespec(dst, 0))
return 0; /* error but caught downstream */
- base_size = ((src->size < dst->size) ? src->size : dst->size);
max_size = ((src->size > dst->size) ? src->size : dst->size);
if (max_size < MINIMUM_BREAK_SIZE)
return 0; /* we do not break too small filepair */
diff --git a/fast-import.c b/fast-import.c
index 3748ddf48d9bdeea890af805016b69e76493a79d..beeac0d0049d920726befab88a2ffa4eeddcb163 100644 (file)
--- a/fast-import.c
+++ b/fast-import.c
static int validate_raw_date(const char *src, char *result, int maxlen)
{
const char *orig_src = src;
- char *endp, sign;
- unsigned long date;
+ char *endp;
errno = 0;
- date = strtoul(src, &endp, 10);
+ strtoul(src, &endp, 10);
if (errno || endp == src || *endp != ' ')
return -1;
src = endp + 1;
if (*src != '-' && *src != '+')
return -1;
- sign = *src;
- date = strtoul(src + 1, &endp, 10);
+ strtoul(src + 1, &endp, 10);
if (errno || endp == src || *endp || (endp - orig_src) >= maxlen)
return -1;
index 97f76c58155249412d7c59e965b564dfc0f75181..511b82cba9977c14d6dcba5efbd6d38591d3aacc 100644 (file)
--- a/fsck.c
+++ b/fsck.c
struct tree_desc desc;
unsigned o_mode;
const char *o_name;
- const unsigned char *o_sha1;
init_tree_desc(&desc, item->buffer, item->size);
o_mode = 0;
o_name = NULL;
- o_sha1 = NULL;
while (desc.size) {
unsigned mode;
const char *name;
- const unsigned char *sha1;
- sha1 = tree_entry_extract(&desc, &name, &mode);
+ tree_entry_extract(&desc, &name, &mode);
if (strchr(name, '/'))
has_full_path = 1;
o_mode = mode;
o_name = name;
- o_sha1 = sha1;
}
retval = 0;
diff --git a/xdiff-interface.c b/xdiff-interface.c
index d782f06d9916bdde33dc3f7312f9eac4e14ef3a1..b9b0db8d86615d6ca1046b932772f3d9750a8062 100644 (file)
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
{
char *cp = *cp_p;
int num = 0;
- int read_some;
while ('0' <= *cp && *cp <= '9')
num = num * 10 + *cp++ - '0';
- if (!(read_some = cp - *cp_p))
+ if (!(cp - *cp_p))
return -1;
*cp_p = cp;
*num_p = num;