From 207e8180e140efd5f93a3d52332d7b718a09bf34 Mon Sep 17 00:00:00 2001
From: Mike Palmiotto <mike.palmiotto@crunchydata.com>
Date: Wed, 5 Apr 2017 14:31:25 +0000
Subject: [PATCH 2/3] Silence "maybe uninitialized" sepgsql warnings

sepgsql throws compiler warnings due to possibly uninitialized tclass in code
paths for indexes when compiling with -Og. Initialize tclass to 0 to silence
these warnings.
---
 contrib/sepgsql/relation.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/contrib/sepgsql/relation.c b/contrib/sepgsql/relation.c
index ab98a9b..b794abe 100644
--- a/contrib/sepgsql/relation.c
+++ b/contrib/sepgsql/relation.c
@@ -243,7 +243,7 @@ sepgsql_relation_post_create(Oid relOid)
 	HeapTuple	tuple;
 	Form_pg_class classForm;
 	ObjectAddress object;
-	uint16		tclass;
+	uint16_t	tclass = 0;
 	char	   *scontext;		/* subject */
 	char	   *tcontext;		/* schema */
 	char	   *rcontext;		/* relation */
@@ -413,7 +413,7 @@ sepgsql_relation_drop(Oid relOid)
 {
 	ObjectAddress object;
 	char	   *audit_name;
-	uint16_t	tclass;
+	uint16_t	tclass = 0;
 	char		relkind;
 
 	relkind = get_rel_relkind(relOid);
@@ -580,7 +580,7 @@ sepgsql_relation_setattr(Oid relOid)
 	Form_pg_class newform;
 	ObjectAddress object;
 	char	   *audit_name;
-	uint16_t	tclass;
+	uint16_t	tclass = 0;
 
 	switch (get_rel_relkind(relOid))
 	{
-- 
1.8.3.1

