summaryrefslogtreecommitdiffstats
path: root/src/generator.ml
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-04-20 11:45:11 +0100
committerRichard Jones <rjones@redhat.com>2009-04-20 11:45:11 +0100
commit42341cc00362a9983142a95f36622ea5baeb280a (patch)
tree9a388eadd66bef9fc0ab381372aaaae853cc9ada /src/generator.ml
parent2069ade88144d8efd272a74be24b5c9ff49844dc (diff)
downloadlibguestfs-42341cc00362a9983142a95f36622ea5baeb280a.tar.gz
libguestfs-42341cc00362a9983142a95f36622ea5baeb280a.tar.xz
libguestfs-42341cc00362a9983142a95f36622ea5baeb280a.zip
Avoid warning: Don't generate read_reply label unless needed.
Diffstat (limited to 'src/generator.ml')
-rwxr-xr-xsrc/generator.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/generator.ml b/src/generator.ml
index 4ca3dc2f..191b94df 100755
--- a/src/generator.ml
+++ b/src/generator.ml
@@ -2334,6 +2334,7 @@ check_state (guestfs_h *g, const char *caller)
pr "\n";
(* Send any additional files (FileIn) requested. *)
+ let need_read_reply_label = ref false in
List.iter (
function
| FileIn n ->
@@ -2347,13 +2348,14 @@ check_state (guestfs_h *g, const char *caller)
pr " }\n";
pr " if (r == -2) /* daemon cancelled */\n";
pr " goto read_reply;\n";
+ need_read_reply_label := true;
pr " }\n";
pr "\n";
| _ -> ()
) (snd style);
(* Wait for the reply from the remote end. *)
- pr " read_reply:\n";
+ if !need_read_reply_label then pr " read_reply:\n";
pr " guestfs__switch_to_receiving (g);\n";
pr " ctx.cb_sequence = 0;\n";
pr " guestfs_set_reply_callback (g, %s_reply_cb, &ctx);\n" shortname;