public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* add missing value to gthread_once return statement for VxWorks
@ 2017-06-02 16:21 Olivier Hainque
  0 siblings, 0 replies; only message in thread
From: Olivier Hainque @ 2017-06-02 16:21 UTC (permalink / raw)
  To: GCC Patches; +Cc: Nathan Sidwell

[-- Attachment #1: Type: text/plain, Size: 486 bytes --]

Hello,

Something we noticed through sporadic runtime mishaps on powerpc-vxworks.

__gthread_once returns int and the VxWorks implementation has a dangling lone
"return;" for a subcase.

This patch adds the missing return value, based on what is returned for a
similar state elsewhere. Committing as obvious.

With Kind Regards,

Olivier

2017-06-02  Olivier Hainque  <hainque@adacore.com>

	libgcc/
	* config/vxlib.c (__gthread_once): Add missing value to
	a nested return statement.


[-- Attachment #2: vxlib-return.diff --]
[-- Type: application/octet-stream, Size: 388 bytes --]

Index: libgcc/config/vxlib.c
===================================================================
--- libgcc/config/vxlib.c	(revision 248673)
+++ libgcc/config/vxlib.c	(working copy)
@@ -70,7 +70,7 @@
       /* This can happen on powerpc, which is using all 32 bits
 	 of the gthread_once_t structure.  */
       if (guard->done)
-	return;
+	return 0;
 #endif
       taskDelay (1);
     }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-06-02 16:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 16:21 add missing value to gthread_once return statement for VxWorks Olivier Hainque

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).