Просмотр исходного кода

Minor warning cleanups.

AIX uses the const version of the structures.
Notate the intentional fallthoughs in the sprintf code.
Doug Nazar 1 год назад
Родитель
Сommit
eddf952aea
5 измененных файлов с 6 добавлено и 4 удалено
  1. 1 1
      include/nrpe-ssl.h
  2. 1 1
      src/check_nrpe.c
  3. 1 1
      src/nrpe-ssl.c
  4. 1 1
      src/nrpe.c
  5. 2 0
      src/snprintf.c

+ 1 - 1
include/nrpe-ssl.h

@@ -27,7 +27,7 @@ typedef struct _SSL_PARMS {
 
 
 #ifdef HAVE_SSL
-# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(__hpux)
 extern SSL_METHOD *meth;
 # else
 extern const SSL_METHOD *meth;

+ 1 - 1
src/check_nrpe.c

@@ -950,7 +950,7 @@ int connect_to_remote(void)
 			logit(LOG_NOTICE, "Remote %s - SSL Version: %s", rem_host, SSL_get_version(ssl));
 
 		if (sslprm.log_opts & SSL_LogCipher) {
-# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(__hpux)
 			SSL_CIPHER *c = SSL_get_current_cipher(ssl);
 # else
 			const SSL_CIPHER *c = SSL_get_current_cipher(ssl);

+ 1 - 1
src/nrpe-ssl.c

@@ -6,7 +6,7 @@
 #include "utils.h"
 
 #ifdef HAVE_SSL
-# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(__hpux)
 SSL_METHOD *meth;
 # else
 const SSL_METHOD *meth;

+ 1 - 1
src/nrpe.c

@@ -1821,7 +1821,7 @@ void init_handle_conn(void)
 #ifdef HAVE_SSL
 int handle_conn_ssl(int sock, void *ssl_ptr)
 {
-# if (defined(__sun) && defined(SOLARIS_10)) || defined(_AIX) || defined(__hpux)
+# if (defined(__sun) && defined(SOLARIS_10)) || defined(__hpux)
 	SSL_CIPHER *c;
 #else
 	const SSL_CIPHER *c;

+ 2 - 0
src/snprintf.c

@@ -494,6 +494,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
 				break;
 			case 'X':
 				cnk->flags |= DP_F_UP;
+				/* fallthrough */
 			case 'x':
 				cnk->type = CNK_HEX;
 				cnk->flags |= DP_F_UNSIGNED;
@@ -504,6 +505,7 @@ static size_t dopr(char *buffer, size_t maxlen, const char *format, va_list args
 			case 'G':
 			case 'F':
 				cnk->flags |= DP_F_UP;
+				/* fallthrough */
 			case 'a':
 				/* hex float not supported yet */
 			case 'e':