octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #54389] warnings when building on Solaris


From: Rik
Subject: [Octave-bug-tracker] [bug #54389] warnings when building on Solaris
Date: Thu, 26 Jul 2018 15:35:33 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Follow-up Comment #5, bug #54389 (project octave):

For the warnings related to printf and pthread_t, if I check
/usr/include/x86_64-linux-gnu/bits/pthreadtypes.h I find


typedef unsigned long int pthread_t;


so on my Linux system "%ld" is an okay printf specifier.  I assume if you
check on Solaris you will find that pthread_t is defined as just unsigned int.
 In this case, we could throw in a static_cast to <unsigned long int> to
guarantee the format works out.


fprintf (of, "%ld: %s%d (%s)\n", pthread_self (), prefix, sig,
=>
fprintf (of, "%ld: %s%d (%s)\n", static_cast<unsigned long int> (pthread_self
()), prefix, sig,




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?54389>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]