You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brpc.apache.org by GitBox <gi...@apache.org> on 2023/01/05 22:42:59 UTC

[GitHub] [incubator-brpc] yurivict opened a new issue, #2071: error: cannot initialize return object of type 'uint64_t' (aka 'unsigned long') with an rvalue of type 'pthread_t'

yurivict opened a new issue, #2071:
URL: https://github.com/apache/incubator-brpc/issues/2071

   **Describe the bug (描述bug)**
   ```
   /usr/ports/devel/brpc/work/incubator-brpc-1.3.0/src/butil/compat.h:85:12: error: cannot initialize return object of type 'uint64_t' (aka 'unsigned long') with an rvalue of type 'pthread_t' (aka 'pthread *')
       return pthread_self();
              ^~~~~~~~~~~~~~
   2 errors generated.
   ``
   
   **To Reproduce (复现方法)**
   build on FreeBSD
   
   According to the documentation pthread_self returns pthread_t:
   ```
   NAME
        pthread_self – get the calling thread's ID
   
   LIBRARY
        POSIX Threads Library (libpthread, -lpthread)
   
   SYNOPSIS
        #include <pthread.h>
   
        pthread_t
        pthread_self(void);
   ```
   pthread_t generally can not and should not be typecast to any other type.
   
   
   
   **Versions (各种版本)**
   OS: FreeBSD 13.1
   Compiler: clang-14
   brpc: 1.3.0
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org


[GitHub] [brpc] wwbmmm commented on issue #2071: error: cannot initialize return object of type 'uint64_t' (aka 'unsigned long') with an rvalue of type 'pthread_t'

Posted by GitBox <gi...@apache.org>.
wwbmmm commented on issue #2071:
URL: https://github.com/apache/brpc/issues/2071#issuecomment-1378160660

   related: #2072


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@brpc.apache.org
For additional commands, e-mail: dev-help@brpc.apache.org