Fixes for -Wunused

* lib/utils_base.c
* plugins/check_curl.c
* plugins-root/check_dhcp.c
   Removed a line which theoretically can not do anything, but there was
   comment which indicated something else. Still trying this though.
This commit is contained in:
RincewindsHat 2023-03-12 14:16:35 +01:00
parent cee364f219
commit 6c78f0b5ea
3 changed files with 6 additions and 11 deletions

View file

@ -24,7 +24,7 @@
*
*****************************************************************************/
#include "common.h"
#include "../plugins/common.h"
#include <stdarg.h>
#include "utils_base.h"
#include <ctype.h>
@ -319,18 +319,18 @@ char *np_extract_value(const char *varlist, const char *name, char sep) {
while (1) {
/* Strip any leading space */
for (varlist; isspace(varlist[0]); varlist++);
for (; isspace(varlist[0]); varlist++);
if (strncmp(name, varlist, strlen(name)) == 0) {
varlist += strlen(name);
/* strip trailing spaces */
for (varlist; isspace(varlist[0]); varlist++);
for (; isspace(varlist[0]); varlist++);
if (varlist[0] == '=') {
/* We matched the key, go past the = sign */
varlist++;
/* strip leading spaces */
for (varlist; isspace(varlist[0]); varlist++);
for (; isspace(varlist[0]); varlist++);
if (tmp = index(varlist, sep)) {
/* Value is delimited by a comma */

View file

@ -470,10 +470,6 @@ int send_dhcp_discover(int sock){
packet_xid=random();
discover_packet.xid=htonl(packet_xid);
/**** WHAT THE HECK IS UP WITH THIS?!? IF I DON'T MAKE THIS CALL, ONLY ONE SERVER RESPONSE IS PROCESSED!!!! ****/
/* downright bizzarre... */
ntohl(discover_packet.xid);
/*discover_packet.secs=htons(65535);*/
discover_packet.secs=0xFF;

View file

@ -2217,11 +2217,10 @@ curlhelp_parse_statusline (const char *buf, curlhelp_statusline *status_line)
if( strchr( p, '.' ) != NULL ) {
/* HTTP 1.x case */
char *ppp;
ppp = strtok( p, "." );
strtok( p, "." );
status_line->http_major = (int)strtol( p, &pp, 10 );
if( *pp != '\0' ) { free( first_line_buf ); return -1; }
ppp = strtok( NULL, " " );
strtok( NULL, " " );
status_line->http_minor = (int)strtol( p, &pp, 10 );
if( *pp != '\0' ) { free( first_line_buf ); return -1; }
p += 4; /* 1.x SP */