From c3910711612650ab5d605ac623eb04d6e3a16138 Mon Sep 17 00:00:00 2001
From: Konstantin Osipov <kostja@tarantool.org>
Date: Thu, 15 May 2014 12:43:07 +0400
Subject: [PATCH] Fix compile warnings on FreeBSD.

---
 src/box/box.cc   | 7 ++-----
 src/box/schema.h | 4 ++--
 src/recovery.cc  | 3 ++-
 src/util.cc      | 1 +
 4 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/box/box.cc b/src/box/box.cc
index 5b9c895d36..8272700962 100644
--- a/src/box/box.cc
+++ b/src/box/box.cc
@@ -308,7 +308,7 @@ box_on_cluster_join(const tt_uuid *node_uuid)
 }
 
 static void
-box_set_cluster_uuid(struct recovery_state *r)
+box_set_cluster_uuid()
 {
 	/* Save Cluster-UUID to _schema space */
 	tt_uuid cluster_uuid;
@@ -328,9 +328,6 @@ box_set_cluster_uuid(struct recovery_state *r)
 	req.tuple_end = data;
 
 	process_rw(&null_port, &req);
-
-	/* Cluster-UUID was be updated by a _schema trigger */
-	assert(tt_uuid_cmp(&r->cluster_uuid, &cluster_uuid) == 0);
 }
 
 void
@@ -399,7 +396,7 @@ box_init()
 	} else {
 		/* Initialize cluster */
 		cluster_bootstrap(recovery_state);
-		box_set_cluster_uuid(recovery_state);
+		box_set_cluster_uuid();
 		recovery_fix_lsn(recovery_state, true);
 		snapshot_save(recovery_state);
 	}
diff --git a/src/box/schema.h b/src/box/schema.h
index eadc0f9c00..513630e493 100644
--- a/src/box/schema.h
+++ b/src/box/schema.h
@@ -48,10 +48,10 @@ enum schema_id {
 	/** Space id of _cluster. */
 	SC_CLUSTER_ID = 320,
 	/** End of the reserved range of system spaces. */
-	SC_SYSTEM_ID_MAX = 511
+	SC_SYSTEM_ID_MAX = 511,
+	SC_ID_NIL = 2147483647
 };
 
-enum { SC_ID_NIL = 4294967295 };
 
 extern int sc_version;
 
diff --git a/src/recovery.cc b/src/recovery.cc
index 4a06d01cc7..e1fde0d808 100644
--- a/src/recovery.cc
+++ b/src/recovery.cc
@@ -614,7 +614,8 @@ recover_remaining_wals(struct recovery_state *r)
 		 * last file, try opening .<ext>.inprogress.
 		 */
 		if (next_wal == NULL) {
-			say_warn("open fail: %lu", current_lsn);
+			say_warn("open fail: %lld",
+				 (long long) current_lsn);
 			if (r->finalize && suffix == INPROGRESS) {
 				/*
 				 * There is an .inprogress file, but
diff --git a/src/util.cc b/src/util.cc
index 1cf563abf2..375fb87a75 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -206,6 +206,7 @@ fdprintf(int fd, const char *format, ...)
 FILE *
 fmemopen(void *buf, size_t size, const char *mode)
 {
+	(void) mode;
 	assert(strcmp(mode, "r") == 0);
 
 	FILE *ret = tmpfile();
-- 
GitLab