From fc5092db460407675a5c9b4e9180a06b9e4cdb96 Mon Sep 17 00:00:00 2001
From: "Rob Swindell (on ChromeOS)" <rob@synchro.net>
Date: Sun, 11 Jun 2023 13:54:51 -0700
Subject: [PATCH] =?UTF-8?q?Fix=20GCC=20warning:=20ignoring=20return=20valu?=
 =?UTF-8?q?e=20of=20=E2=80=98vasprintf=E2=80=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

... declared with attribute ‘warn_unused_result’
---
 src/uifc/uifcx.c | 17 ++---------------
 1 file changed, 2 insertions(+), 15 deletions(-)

diff --git a/src/uifc/uifcx.c b/src/uifc/uifcx.c
index fb4c441552..5db14de94b 100644
--- a/src/uifc/uifcx.c
+++ b/src/uifc/uifcx.c
@@ -1,7 +1,5 @@
 /* Standard I/O Implementation of UIFC (user interface) library */
 
-/* $Id: uifcx.c,v 1.41 2020/08/16 20:37:08 rswindell Exp $ */
-
 /****************************************************************************
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
@@ -15,21 +13,9 @@
  * See the GNU Lesser General Public License for more details: lgpl.txt or	*
  * http://www.fsf.org/copyleft/lesser.html									*
  *																			*
- * Anonymous FTP access to the most recent released source is available at	*
- * ftp://vert.synchro.net, ftp://cvs.synchro.net and ftp://ftp.synchro.net	*
- *																			*
- * Anonymous CVS access to the development source and modification history	*
- * is available at cvs.synchro.net:/cvsroot/sbbs, example:					*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs login			*
- *     (just hit return, no password is necessary)							*
- * cvs -d :pserver:anonymous@cvs.synchro.net:/cvsroot/sbbs checkout src		*
- *																			*
  * For Synchronet coding style and modification guidelines, see				*
  * http://www.synchro.net/source.html										*
  *																			*
- * You are encouraged to submit any modifications (preferably in Unix diff	*
- * format) via e-mail to mods@synchro.net									*
- *																			*
  * Note: If this box doesn't appear square, then you need to fix your tabs.	*
  ****************************************************************************/
 
@@ -388,7 +374,8 @@ int umsgf(char* fmt, ...)
 	char* buf = NULL;
 
 	va_start(va, fmt);
-	vasprintf(&buf, fmt, va);
+	if(vasprintf(&buf, fmt, va) == -1)
+		buf = NULL;
 	va_end(va);
 	if(buf != NULL) {
 		retval = umsg(buf);
-- 
GitLab