diff options
author | Toomas Soome <tsoome@me.com> | 2022-11-07 15:50:43 +0200 |
---|---|---|
committer | Toomas Soome <tsoome@me.com> | 2022-11-29 19:34:45 +0200 |
commit | 9f3a0b43a03b04d53325dbc0fcefe03085efe59f (patch) | |
tree | 2031240c185af9cfa034e6143f23ac4cf7b580c5 | |
parent | 0cab3dcd1eb7944361370218fd81d56d85907ed1 (diff) | |
download | illumos-gate-9f3a0b43a03b04d53325dbc0fcefe03085efe59f.tar.gz |
15162 rpcgen: warnings from generated code
Reviewed by: Marcel Telka <marcel@telka.sk>
Reviewed by: Igor Kozhukhov <igor@dilos.org>
Reviewed by: Gordon Ross <gordon.w.ross@gmail.com>
Approved by: Dan McDonald <danmcd@mnx.io>
-rw-r--r-- | usr/src/cmd/rpcgen/rpc_cout.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr/src/cmd/rpcgen/rpc_cout.c b/usr/src/cmd/rpcgen/rpc_cout.c index 8a661fc1bb..d0192c8152 100644 --- a/usr/src/cmd/rpcgen/rpc_cout.c +++ b/usr/src/cmd/rpcgen/rpc_cout.c @@ -153,8 +153,7 @@ print_header(definition *def) if (inlinelen == 0) return; - /* May cause lint to complain. but ... */ - f_print(fout, "\trpc_inline_t *buf;\n\n"); + f_print(fout, "\trpc_inline_t *buf __unused;\n\n"); } static void @@ -220,7 +219,7 @@ print_ifclose(int indent) static void print_ifstat(int indent, char *prefix, char *type, relation rel, - char *amax, char *objname, char *name) + char *amax, char *objname, char *name) { char *alt = NULL; @@ -363,6 +362,9 @@ emit_union(definition *def) dflt->array_max, object, dflt->name); free(object); f_print(fout, "\t\tbreak;\n"); + } else { + f_print(fout, "\tdefault:\n"); + f_print(fout, "\t\tbreak;\n"); } } else { f_print(fout, "\tdefault:\n"); |