Skip to content

Print stderr message if pthread_setname_np() fail#1857

Merged
SebKuzminsky merged 1 commit intoLinuxCNC:masterfrom
petterreinholdtsen:code-nowarn-pth-setname
Jul 20, 2022
Merged

Print stderr message if pthread_setname_np() fail#1857
SebKuzminsky merged 1 commit intoLinuxCNC:masterfrom
petterreinholdtsen:code-nowarn-pth-setname

Conversation

@petterreinholdtsen
Copy link
Copy Markdown
Collaborator

This get rid of this compile time warning:

Compiling rtapi/uspace_rtapi_app.cc
rtapi/uspace_rtapi_app.cc: In function ‘void {anonymous}::set_namef(const char*, ...)’:
rtapi/uspace_rtapi_app.cc:107:9: warning: unused variable ‘res’ [-Wunused-variable]
107 | int res = pthread_setname_np(pthread_self(), buf);
| ^~~

This get rid of this compile time warning:

Compiling rtapi/uspace_rtapi_app.cc
rtapi/uspace_rtapi_app.cc: In function ‘void {anonymous}::set_namef(const char*, ...)’:
rtapi/uspace_rtapi_app.cc:107:9: warning: unused variable ‘res’ [-Wunused-variable]
  107 |     int res = pthread_setname_np(pthread_self(), buf);
      |         ^~~
@SebKuzminsky SebKuzminsky merged commit 7b2f70e into LinuxCNC:master Jul 20, 2022
@petterreinholdtsen petterreinholdtsen deleted the code-nowarn-pth-setname branch July 25, 2022 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants