* TCP ping returns always Alive
* The Availability/Reachability setting of "Ping or SNMP Uptime" is not working in latest spine
* Update some logging functions to add the 'DEBUG' declaration.
While compiling sql.c clang 16 generates the following warning:
```
sql.c:407:27: warning: comparison of address of 'db_pool_local[id].mysql' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (&db_pool_local[id].mysql != NULL) {
~~~~~~~~~~~~~~~~~~^~~~~ ~~~~
sql.c:428:28: warning: comparison of address of 'db_pool_remote[id].mysql' not equal to a null pointer is always true [-Wtautological-pointer-compare]
if (&db_pool_remote[id].mysql != NULL) {
~~~~~~~~~~~~~~~~~~~^~~~~ ~~~~
```
If the conditional is always true then the fix is to remove the
conditional in this instance
Co-authored-by: Erik Sejr <eriks@ssicanada.com>
I actually think this one should be an unsigned long int instead of just
a long int.
---------
Co-authored-by: Erik Sejr <eriks@ssicanada.com>
Co-authored-by: TheWitness <thewitness@cacti.net>
while compiling spine clang 16 generates the following warning:
```
snmp.c:590:58: warning: passing 'char[2048]' to parameter of type 'const u_char *' (aka 'const unsigned char *') converts between pointers to integer types where one is of the unique plain 'char' type and the other is not [-Wpointer-sign]
snprint_asciistring(result_string, RESULTS_BUFFER, temp_result, strlen(temp_result));
```
If the function treats this as a unsigned char *, I don't see any issue
casting it as such before passing it in to suppress the warning.
Co-authored-by: Erik Sejr <eriks@ssicanada.com>
While compiling Clang 16 generates the following warnings.
in spine.c:
```
spine.c:934:101: warning: format specifies type 'long' but the argument has type 'pthread_t' (aka 'struct pthread *') [-Wformat]
SPINE_LOG_DEBUG(("DEBUG: Device[%i] Valid Thread to be Created (%ld)", poller_details->host_id, threads[device_counter]));
```
in util.c:
```
util.c:1265:100: warning: format specifies type 'long' but the argument has type 'pthread_t' (aka 'struct pthread *') [-Wformat]
snprintf(logprefix, SMALL_BUFSIZE, "SPINE: Poller[%i] PID[%i] PT[%ld] ", set.poller_id, getpid(), pthread_self());
```
This one i'm not as sure about, maybe this should be cast to a long
unsigned int instead? I have not had problems running it this way but
i'm not 100% sure this the right fix.
Co-authored-by: Erik Sejr <eriks@ssicanada.com>