ehlo,
I am not sure wheter attached patch is right solution of warning.
On one hand it remove dead code, but there is still another warning reported by static analyzers.
Error: UNUSED_VALUE (CWE-563): [#def18] gssproxy-0.4.0/src/mechglue/gpp_init_sec_context.c:141: value_overwrite: Overwriting previous write to "behavior" with value from "gpp_get_behavior()". gssproxy-0.4.0/src/mechglue/gpp_init_sec_context.c:129: assigned_value: Assigning value "GPP_LOCAL_ONLY" to "behavior" here, but that stored value is overwritten before it can be used. # 127| * local mech, so let's just re-enter the mechglue here, as we # 128| * have no way to export creds yet. */ # 129|-> behavior = GPP_LOCAL_ONLY; # 130| } # 131| } else {
So it's possible that code should not be removed but moved to another place to fix the 2nd warning.
LS
On Sat, 2015-03-28 at 17:53 +0100, Lukas Slebodnik wrote:
ehlo,
I am not sure wheter attached patch is right solution of warning.
On one hand it remove dead code, but there is still another warning reported by static analyzers.
Error: UNUSED_VALUE (CWE-563): [#def18] gssproxy-0.4.0/src/mechglue/gpp_init_sec_context.c:141: value_overwrite: Overwriting previous write to "behavior" with value from "gpp_get_behavior()". gssproxy-0.4.0/src/mechglue/gpp_init_sec_context.c:129: assigned_value: Assigning value "GPP_LOCAL_ONLY" to "behavior" here, but that stored value is overwritten before it can be used. # 127| * local mech, so let's just re-enter the mechglue here, as we # 128| * have no way to export creds yet. */ # 129|-> behavior = GPP_LOCAL_ONLY; # 130| } # 131| } else {
So it's possible that code should not be removed but moved to another place to fix the 2nd warning.
Thanks for all the patches, The first 4 are ok, ACKed and pushed to master (I also added the Signed-off-by that you forgot to set).
This patch though is not complete. The problem comes out of the previous patch where some checks were inverted and I forgot to move the fallback code. It also highlights a failure to stick to the LOCAL_ONLY override when it is set.
I will send a patch that covers these issues, this one is NACKed.
Simo.
gss-proxy@lists.fedorahosted.org