[PATCH] Avoid a warning with -Wno-tautological-compare

2016-07-20 Thread Nadav Har'El
Needed on gcc 6 for one of the files

Signed-off-by: Nadav Har'El 
---
 Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Makefile b/Makefile
index 63427bf..530e9a5 100644
--- a/Makefile
+++ b/Makefile
@@ -502,6 +502,8 @@ $(out)/bsd/sys/netinet/in_rmx.o: 
COMMON+=-fno-strict-aliasing
 $(out)/bsd/sys/netinet/ip_input.o: COMMON+=-fno-strict-aliasing
 $(out)/bsd/sys/netinet/in.o: COMMON+=-fno-strict-aliasing
 
+$(out)/bsd/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.o: 
COMMON+=-Wno-tautological-compare
+
 bsd  = bsd/init.o
 bsd += bsd/net.o
 bsd += bsd/$(arch)/machine/in_cksum.o
-- 
2.5.5

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PATCH] Drop unneeded include statement

2016-07-20 Thread Nadav Har'El
Signed-off-by: Nadav Har'El 
---
 core/mempool.cc | 1 -
 1 file changed, 1 deletion(-)

diff --git a/core/mempool.cc b/core/mempool.cc
index 0fbd857..50c938f 100644
--- a/core/mempool.cc
+++ b/core/mempool.cc
@@ -11,7 +11,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
-- 
2.5.5

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[PATCH] Do not use enum class as constructor priority

2016-07-20 Thread Nadav Har'El
According to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=59281 gcc 6 no
longer allows to use enum class as constructor priorities, as we did in
include/osv/prio.hh. Constructor priorities must be integers, and enum
class do not support conversion to int.

The solution is to go back to old-style enum, which do have conversion to
int. Put this enum inside a namespace so we can still use names like
init_prio::sched and don't need to change any of the callers.

Fixes #769

Signed-off-by: Nadav Har'El 
---
 include/osv/prio.hh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/osv/prio.hh b/include/osv/prio.hh
index 1a3d0eb..c3cb474 100644
--- a/include/osv/prio.hh
+++ b/include/osv/prio.hh
@@ -8,7 +8,8 @@
 #ifndef PRIO_HH_
 #define  PRIO_HH_
 
-enum class init_prio : int {
+namespace init_prio {
+enum {
 dtb = 101,
 console,
 sort,
@@ -32,5 +33,6 @@ enum class init_prio : int {
 malloc_pools,
 idt,
 };
+}
 
 #endif
-- 
2.5.5

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.