Call some functions in guile/ for effect
authorTom Tromey <tom@tromey.com>
Sun, 8 Jul 2018 18:16:20 +0000 (12:16 -0600)
committerTom Tromey <tom@tromey.com>
Sun, 22 Jul 2018 19:20:03 +0000 (13:20 -0600)
This changes a couple of spots in guile/ to remove a variable
declaration but to still call a function for effect.

gdb/ChangeLog
2018-07-22  Tom Tromey  <tom@tromey.com>

* guile/scm-cmd.c (gdbscm_dont_repeat): Call
cmdscm_get_valid_command_smob_arg_unsafe for effect.
* guile/scm-block.c (gdbscm_make_block_syms_iter): Call
bkscm_get_valid_block_smob_arg_unsafe for effect.

gdb/ChangeLog
gdb/guile/scm-block.c
gdb/guile/scm-cmd.c

index 8eb2cde80f7e2a122ba12704f033a9cbc96321ea..68edfcfca408dd4a7326d91cce521f9b9aa3a3c9 100644 (file)
@@ -1,3 +1,10 @@
+2018-07-22  Tom Tromey  <tom@tromey.com>
+
+       * guile/scm-cmd.c (gdbscm_dont_repeat): Call
+       cmdscm_get_valid_command_smob_arg_unsafe for effect.
+       * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
+       bkscm_get_valid_block_smob_arg_unsafe for effect.
+
 2018-07-22  Tom Tromey  <tom@tromey.com>
 
        * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
index d4566fc1ffe31a0f5c146b690097bdf2c97d8ce9..9caff799dc1a8bf4cbcf58d6e6c08658e3c167e4 100644 (file)
@@ -613,9 +613,8 @@ bkscm_block_syms_progress_p (SCM scm)
 static SCM
 gdbscm_make_block_syms_iter (SCM self)
 {
-  block_smob *b_smob
-    = bkscm_get_valid_block_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
-  const struct block *block = b_smob->block;
+  /* Call for side effects.  */
+  bkscm_get_valid_block_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
   SCM progress, iter;
 
   progress = bkscm_make_block_syms_progress_smob ();
index 88a98643a910056e2cc12027540e250e76c19cf7..4291933e40e2c82bfb68e8c36b6c919db3df2461 100644 (file)
@@ -267,9 +267,9 @@ gdbscm_command_valid_p (SCM self)
 static SCM
 gdbscm_dont_repeat (SCM self)
 {
-  /* We currently don't need anything from SELF, but still verify it.  */
-  command_smob *c_smob
-    = cmdscm_get_valid_command_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
+  /* We currently don't need anything from SELF, but still verify it.
+     Call for side effects.  */
+  cmdscm_get_valid_command_smob_arg_unsafe (self, SCM_ARG1, FUNC_NAME);
 
   dont_repeat ();