Quellcode durchsuchen

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 vor 6 Monaten
Ursprung
Commit
4d601d1865
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      exec/totemconfig.c

+ 1 - 0
exec/totemconfig.c

@@ -405,6 +405,7 @@ int totem_volatile_config_validate (
 		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) {
 		snprintf (local_error_reason, sizeof(local_error_reason),
 			"The token warning parameter (%d%%) must be between 0 (disabled) and 100.",