uninitialized-variable-20040504
authorJeffrey Altman <jaltman@mit.edu>
Wed, 5 May 2004 04:24:57 +0000 (04:24 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 5 May 2004 04:24:57 +0000 (04:24 +0000)
Do not assign reference to declaration in cases which declaration is
not assigned a value.

src/rxgen/rpc_parse.c

index 3d2d7b3..63a47fa 100644 (file)
@@ -902,7 +902,8 @@ analyze_ProcParams(definition * defp, token * tokp)
        Proc_listp = &Proc_list->next;
        decls = ALLOC(decl_list);
        memset((char *)decls, 0, sizeof(decl_list));
-       decls->decl = dec;
+    if (tokp->kind != TOK_RPAREN)
+        decls->decl = dec;
        *tailp = decls;
        tailp = &decls->next;
     } while (tokp->kind != TOK_RPAREN);