Description of Problem: Hello there, I just tried to compile package openldap12-1.2.13-5 from Redhat 8.0. Here are some of the compiler messages. ldapmodrdn.c:48: warning: operation on `myname' may be undefined Here is a patch which fixes the messages. *** ./clients/tools/ldapmodrdn.c.old 2002-11-18 12:51:44.000000000 +0000 --- ./clients/tools/ldapmodrdn.c 2002-11-18 12:53:01.000000000 +0000 *************** *** 45,51 **** not = contoper = verbose = remove = want_bindpw = debug = 0; authmethod = LDAP_AUTH_SIMPLE; ! myname = (myname = strrchr(argv[0], '/')) == NULL ? argv[0] : ++myname; while (( i = getopt( argc, argv, "WkKcnvrh:p:D:w:d:f:" )) != EOF ) { switch( i ) { --- 45,58 ---- not = contoper = verbose = remove = want_bindpw = debug = 0; authmethod = LDAP_AUTH_SIMPLE; ! if ((myname = strrchr(argv[0], '/')) == NULL) ! { ! myname = argv[0]; ! } ! else ! { ! ++myname; ! } while (( i = getopt( argc, argv, "WkKcnvrh:p:D:w:d:f:" )) != EOF ) { switch( i ) { Also, the compiler found ldapsearch.c:477: warning: `tmpfd' might be used uninitialized in this function ldapmodify.c:248: warning: `modop' might be used uninitialized in this function ldapdelete.c:40: warning: `rc' might be used uninitialized in this function ldapmodrdn.c:40: warning: `entrydn' might be used uninitialized in this function ldapmodrdn.c:40: warning: `rdn' might be used uninitialized in this function main.c:321: warning: `output_string' might be used uninitialized in this function main.c:253: warning: `rc' might be used uninitialized in this function main.c:253: warning: `matches' might be used uninitialized in this function main.c:255: warning: `fi' might be used uninitialized in this function rp500.c:60: warning: `rc' might be used uninitialized in this function rp500.c:60: warning: `matches' might be used uninitialized in this function rp500.c:67: warning: `fi' might be used uninitialized in this function query.c:47: warning: `lfi' might be used uninitialized in this function idl.c:329: warning: `rc' might be used uninitialized in this function search.c:47: warning: `stoptime' might be used uninitialized in this function search.c:436: warning: `filterarg_ptr' might be used uninitialized in this function modrdn.c:35: warning: `old_rdn' might be used uninitialized in this function attr.c:95: warning: `indexes' might be used uninitialized in this function filterindex.c:101: warning: `idl' might be used uninitialized in this function main.c:74: warning: `udp' might be used uninitialized in this function value.c:114: warning: `rc' might be used uninitialized in this function centipede.c:475: warning: `last' might be used uninitialized in this function ldif.c:25: warning: `type' might be used uninitialized in this function There seem to be 23 places where the compiler thinks there is a problem. Version-Release number of selected component (if applicable): How Reproducible: Steps to Reproduce: 1. 2. 3. Actual Results: Expected Results: Additional Information:
Not going to patch upstream code to quiet a compiler warning rather than fix a bug or error.