latchset / tang

Tang binding daemon
GNU General Public License v3.0
468 stars 56 forks source link

Avoid clang compiler warning #127

Closed sarroutbi closed 5 months ago

sarroutbi commented 1 year ago

clang compiler is dumping a warning for socket.c code:

error: CLANG_WARNING:
tang-14/src/socket.c:184:10: warning[deadcode.DeadStores]: Although the value stored to 'pid' is used in the enclosing expression, the value is never actually read from 'pid'
#  182|     int status;
#  183|   
#  184|->   while ((pid = waitpid(-1, &status, WNOHANG)) > 0);
#  185|   }
#  186|

This can be easily fixed, as pid variable is not being used