krb5 commit: Silence a gcc warning in t_export_name

Greg Hudson ghudson at MIT.EDU
Sun Aug 12 22:51:39 EDT 2012


https://github.com/krb5/krb5/commit/dd4c99f1e33d33d56ab7807fc6db4a3a97a5c12b
commit dd4c99f1e33d33d56ab7807fc6db4a3a97a5c12b
Author: Greg Hudson <ghudson at mit.edu>
Date:   Sun Aug 12 22:50:33 2012 -0400

    Silence a gcc warning in t_export_name
    
    gcc warnings that nametype may be used uninitialized, presumably
    failing to deduce that usage() never returns.  Initialize nametype to
    make it build.

 src/tests/gssapi/t_export_name.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/tests/gssapi/t_export_name.c b/src/tests/gssapi/t_export_name.c
index e3a76df..d765e28 100644
--- a/src/tests/gssapi/t_export_name.c
+++ b/src/tests/gssapi/t_export_name.c
@@ -97,7 +97,7 @@ int
 main(int argc, char *argv[])
 {
     OM_uint32 minor, major;
-    gss_OID mech = (gss_OID)gss_mech_krb5, nametype;
+    gss_OID mech = (gss_OID)gss_mech_krb5, nametype = NULL;
     gss_name_t name, mechname, impname;
     gss_buffer_desc buf, buf2;
     const char *name_arg, *progname = argv[0];


More information about the cvs-krb5 mailing list