From 76cce8fe7ece071b5775bf4a2a112ce11d27d446 Mon Sep 17 00:00:00 2001 From: Andrew Bettison Date: Thu, 3 Apr 2014 10:36:38 +1030 Subject: [PATCH] Fix enum compiler warnings (clang -Wenum-conversion) --- rhizome_direct_http.c | 2 +- rhizome_store.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/rhizome_direct_http.c b/rhizome_direct_http.c index 9647e3a5..f413cd06 100644 --- a/rhizome_direct_http.c +++ b/rhizome_direct_http.c @@ -722,7 +722,7 @@ void rhizome_direct_http_dispatch(rhizome_direct_sync_request *r) struct rhizome_read read; bzero(&read, sizeof read); - enum rhizome_bundle_status pstatus = rhizome_open_read(&read, &filehash); + enum rhizome_payload_status pstatus = rhizome_open_read(&read, &filehash); switch (pstatus) { case RHIZOME_PAYLOAD_STATUS_EMPTY: case RHIZOME_PAYLOAD_STATUS_STORED: diff --git a/rhizome_store.c b/rhizome_store.c index cb338602..d0fbfcc5 100644 --- a/rhizome_store.c +++ b/rhizome_store.c @@ -607,7 +607,7 @@ enum rhizome_payload_status rhizome_import_payload_from_file(rhizome_manifest *m // file payload is not in the store yet if (rhizome_write_file(&write, filepath)){ rhizome_fail_write(&write); - return RHIZOME_BUNDLE_STATUS_ERROR; + return RHIZOME_PAYLOAD_STATUS_ERROR; } return rhizome_finish_write(&write); @@ -671,7 +671,7 @@ enum rhizome_payload_status rhizome_stat_payload_file(rhizome_manifest *m, const return size ? RHIZOME_PAYLOAD_STATUS_NEW : RHIZOME_PAYLOAD_STATUS_EMPTY; } -static enum rhizome_bundle_status rhizome_write_derive_key(rhizome_manifest *m, struct rhizome_write *write) +static enum rhizome_payload_status rhizome_write_derive_key(rhizome_manifest *m, struct rhizome_write *write) { if (m->payloadEncryption != PAYLOAD_ENCRYPTED) return RHIZOME_PAYLOAD_STATUS_NEW;