aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranklin Wei <me@fwei.tk>2018-07-12 21:10:34 +0000
committerFranklin Wei <me@fwei.tk>2018-07-12 21:10:34 +0000
commit9f29dd5464fd9cca2204fbba90e57dab8888f8d8 (patch)
tree7744e15bdf55055c84cedee3602320f3db8edbd1
parent82e04dce129ee618f11c7c0afc2efd88a3e3dea5 (diff)
downloadcsaa-9f29dd5464fd9cca2204fbba90e57dab8888f8d8.zip
csaa-9f29dd5464fd9cca2204fbba90e57dab8888f8d8.tar.gz
csaa-9f29dd5464fd9cca2204fbba90e57dab8888f8d8.tar.bz2
csaa-9f29dd5464fd9cca2204fbba90e57dab8888f8d8.tar.xz
Comment out unused functions
Should silence some warnings.
-rw-r--r--iomt.c3
-rw-r--r--service_provider.c15
2 files changed, 15 insertions, 3 deletions
diff --git a/iomt.c b/iomt.c
index 292d64c..3b2d705 100644
--- a/iomt.c
+++ b/iomt.c
@@ -481,6 +481,8 @@ static void generate_and_clauses(const struct iomt *tree, char *buf)
buf += sprintf(buf, " AND %s = ?2", tree->db.key2_name);
}
+/* unused */
+#if 0
static void generate_where_clause(const struct iomt *tree, char *buf)
{
buf[0] = '\0';
@@ -499,6 +501,7 @@ static void generate_where_clause(const struct iomt *tree, char *buf)
}
}
}
+#endif
/* returns one of the following:
"" - no keys
diff --git a/service_provider.c b/service_provider.c
index 63ba783..956d2d9 100644
--- a/service_provider.c
+++ b/service_provider.c
@@ -496,6 +496,8 @@ static void insert_version(struct service_provider *sp,
}
}
+#if 0
+/* unused */
static uint64_t count_versions(struct service_provider *sp,
uint64_t file_idx)
{
@@ -511,8 +513,13 @@ static uint64_t count_versions(struct service_provider *sp,
assert(sqlite3_step(st) == SQLITE_ROW);
/* praying it works */
- return sqlite3_column_int64(st, 0);
+ uint64_t count = sqlite3_column_int64(st, 0);
+
+ sqlite3_finalize(st);
+
+ return count;
}
+#endif
static struct file_version *lookup_version(struct service_provider *sp,
uint64_t file_idx,
@@ -1287,19 +1294,21 @@ int sp_main(int sockfd, int logleaves, const char *dbpath, bool overwrite)
}
}
+#if 0
static hash_t test_sign_request(void *userdata, const struct tm_request *req)
{
const char *str = userdata;
return hmac_sha256(req, sizeof(*req), str, strlen(str));
}
+#endif
void sp_test(void)
{
int logleaves = 4;
- clock_t start = clock();
+ //clock_t start = clock();
struct service_provider *sp = sp_new("a", 1, logleaves, "files", "csaatest.db", true);
- clock_t stop = clock();
+ //clock_t stop = clock();
check("Tree initialization", sp != NULL);
#if 0