If it fails, it either means 1) the buffer was too short, but it
provided a truncated message, and we're not going to allocate a bigger
buffer to make it work, or 2) the errno doesn't have a string
corresponding to it, but it provided a message of some sort for the
error, even if it's just something like "Unknown error", and we're not
going to construct our own message.
{
char thread_errbuf[PCAP_ERRBUF_SIZE];
{
char thread_errbuf[PCAP_ERRBUF_SIZE];
- strerror_r(ret, thread_errbuf, PCAP_ERRBUF_SIZE);
+ (void)strerror_r(ret, thread_errbuf, PCAP_ERRBUF_SIZE);
pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error creating the data thread: %s", thread_errbuf);
pthread_attr_destroy(&detachedAttribute);
goto error;
pcap_snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error creating the data thread: %s", thread_errbuf);
pthread_attr_destroy(&detachedAttribute);
goto error;
retval = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
if (retval != 0)
{
retval = pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
if (retval != 0)
{
- strerror_r(retval, errbuf, PCAP_ERRBUF_SIZE);
+ (void)strerror_r(retval, errbuf, PCAP_ERRBUF_SIZE);
rpcapd_log(LOGPRIO_ERROR,
"Can't set cancel state on data thread: %s", errbuf);
goto error;
}
if (pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL))
{
rpcapd_log(LOGPRIO_ERROR,
"Can't set cancel state on data thread: %s", errbuf);
goto error;
}
if (pthread_setcanceltype(PTHREAD_CANCEL_ASYNCHRONOUS, NULL))
{
- strerror_r(retval, errbuf, PCAP_ERRBUF_SIZE);
+ (void)strerror_r(retval, errbuf, PCAP_ERRBUF_SIZE);
rpcapd_log(LOGPRIO_ERROR,
"Can't set cancel type on data thread: %s", errbuf);
goto error;
rpcapd_log(LOGPRIO_ERROR,
"Can't set cancel type on data thread: %s", errbuf);
goto error;