Explorar o código

totemconfig: Suppress coverity no_effect error

Checking of value < 0 is really not needed for unsigned int but it
makes clear what values are used so add coverity specific comment
to suppress this error.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>
Jan Friesse hai 6 meses
pai
achega
4d601d1865
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      exec/totemconfig.c

+ 1 - 0
exec/totemconfig.c

@@ -405,6 +405,7 @@ int totem_volatile_config_validate (
 		goto parse_error;
 		goto parse_error;
 	}
 	}
 
 
+	// coverity[NO_EFFECT:SUPPRESS] clarify bounds of token_warning values and defensive programming
 	if (totem_config->token_warning > 100 || totem_config->token_warning < 0) {
 	if (totem_config->token_warning > 100 || totem_config->token_warning < 0) {
 		snprintf (local_error_reason, sizeof(local_error_reason),
 		snprintf (local_error_reason, sizeof(local_error_reason),
 			"The token warning parameter (%d%%) must be between 0 (disabled) and 100.",
 			"The token warning parameter (%d%%) must be between 0 (disabled) and 100.",