Source: ffindex
Severity: minor
Tags: patch
User: [email protected]
Usertags: clang-ftbfs
Hello,
Using the rebuild infrastructure, your package fails to build with clang
(instead of gcc).
We detected this kinf of error:
http://clang.debian.net/status.php?version=3.5.0rc1&key=NOT_ALLOWED_HERE
Full build log is available here:
http://clang.debian.net/logs/2014-06-16/ffindex_0.9.9.3-1_unstable_clang.log
Thanks,
Alexander
-- System Information:
Debian Release: jessie/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 3.2.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
--- ./src/ffindex.c 2014-08-14 23:34:44.000000000 +0400
+++ ../ffindex-0.9.9.3-my/./src/ffindex.c 2014-08-14 23:27:02.894501997 +0400
@@ -510,11 +510,10 @@
return index;
}
+static FILE* index_file_action = NULL;
+static int ret_action = EXIT_SUCCESS;
-int ffindex_tree_write(ffindex_index_t* index, FILE* index_file)
-{
- int ret = EXIT_SUCCESS;
- void action(const void *node, const VISIT which, const int depth)
+static void action(const void *node, const VISIT which, const int depth)
{
ffindex_entry_t *entry;
switch (which)
@@ -526,13 +525,17 @@
case postorder:
case leaf:
entry = *(ffindex_entry_t **) node;
- if(fprintf(index_file, "%s\t%zd\t%zd\n", entry->name, entry->offset, entry->length) < 0)
- ret = EXIT_FAILURE;
+ if(fprintf(index_file_action, "%s\t%zd\t%zd\n", entry->name, entry->offset, entry->length) < 0)
+ ret_action = EXIT_FAILURE;
break;
}
}
+
+int ffindex_tree_write(ffindex_index_t* index, FILE* index_file)
+{
+ index_file_action = index_file;
twalk(index->tree_root, action);
- return ret;
+ return ret_action;
}
/* vim: ts=2 sw=2 et