Skip to content

Commit 6ca8e46

Browse files
apage43Farshid Ghods
authored andcommitted
MB-100 Fix compile warnings
Change-Id: I07cd4b433e724ca5e359d5eec0532d53bb64bf7a Reviewed-on: http://review.couchbase.org/20549 Reviewed-by: Jens Alfke <jens@couchbase.com> Reviewed-by: Junyi Xie <junyi.couchbase@gmail.com> Reviewed-by: Farshid Ghods <farshid@couchbase.com> Tested-by: Farshid Ghods <farshid@couchbase.com>
1 parent 387609f commit 6ca8e46

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

src/couch_db.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <string.h>
55
#include <stdlib.h>
66
#include <assert.h>
7+
#include <stdio.h>
78

89
#include "internal.h"
910
#include "couch_btree.h"
@@ -1062,15 +1063,15 @@ void couchstore_free_local_document(LocalDoc *lDoc)
10621063
pthread_key_t os_err_key;
10631064
pthread_once_t os_err_init = PTHREAD_ONCE_INIT;
10641065

1065-
void os_error_destroy(void* err_ptr) {
1066+
static void os_error_destroy(void* err_ptr) {
10661067
free(err_ptr);
10671068
}
10681069

1069-
void init_os_error_key() {
1070+
static void init_os_error_key(void) {
10701071
pthread_key_create(&os_err_key, os_error_destroy);
10711072
}
10721073

1073-
struct _os_error *get_os_error_store() {
1074+
struct _os_error *get_os_error_store(void) {
10741075
int once = pthread_once(&os_err_init, init_os_error_key);
10751076
assert(once == 0);
10761077
void *ptr;

src/internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ extern "C" {
8585
node_pointer *read_root(char *buf, int size);
8686
void encode_root(char *buf, node_pointer *node);
8787

88-
struct _os_error *get_os_error_store();
88+
struct _os_error *get_os_error_store(void);
8989

9090
extern pthread_key_t os_err_key;
9191

src/os.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static int win_close(int fd) {
6161
#define close_int win_close
6262
#endif
6363

64-
static inline void save_errno() {
64+
static inline void save_errno(void) {
6565
get_os_error_store()->errno_err = errno;
6666
#ifdef WINDOWS
6767
get_os_error_store()->win_err = 0;

0 commit comments

Comments
 (0)