changeset 808:40b158280f85

synch: initialize obj pointer to silence gcc Even though we exhaustively check the type enum, gcc (but not clang) warns about potentially uninitialized variable. Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
author Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
date Thu, 07 May 2020 10:35:33 -0400
parents d246782c5b8b
children 1d716f721c5c
files synch.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/synch.c	Fri Apr 10 21:31:26 2020 -0400
+++ b/synch.c	Thu May 07 10:35:33 2020 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2019 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
+ * Copyright (c) 2011-2020 Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
  *
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
@@ -169,7 +169,7 @@
 			   enum synch_type type)
 {
 	char synch_chars[2];
-	void *obj;
+	void *obj = NULL;
 
 	switch (type) {
 		case SYNCH_TYPE_MUTEX: