From f8a3e72a30728ba185dc1ac8b398de1aeae7b1b6 Mon Sep 17 00:00:00 2001
From: William Ahern <william@solaris.(none)>
Date: Fri, 27 Dec 2013 06:33:56 -0800
Subject: silence warnings with Solaris Studio compiler

---
 GNUmakefile   | 5 +++++
 src/openssl.c | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/GNUmakefile b/GNUmakefile
index 113ef06..2955d86 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -110,6 +110,11 @@ endif
 ifeq ($(VENDOR_CC_$(d)), sunpro)
 CFLAGS_$(d) += -xcode=pic13
 CFLAGS_$(d) += -g
+#
+# Solaris Studio has a brain-dead function call analyzer which counts
+# arguments before preprocessor expansion.
+#
+CFLAGS_$(d) += -erroff=E_ARGUEMENT_MISMATCH
 endif
 
 ifeq ($(VENDOR_OS_$(d)), Darwin)
diff --git a/src/openssl.c b/src/openssl.c
index 5fcf76d..432c683 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -4167,7 +4167,7 @@ static int mt_init(void) {
 	if (bound && !mt_state.dlref) {
 		Dl_info info;
 
-		if (!dladdr(&luaopen__openssl_rand, &info)) {
+		if (!dladdr((void *)&luaopen__openssl_rand, &info)) {
 			error = -1;
 			goto leave;
 		}
-- 
cgit v1.2.3-59-g8ed1b