Add scm_t_dynwind_flags casts
authorSimon Marchi <simon.marchi@polymtl.ca>
Tue, 27 Oct 2015 13:34:30 +0000 (09:34 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Tue, 27 Oct 2015 13:34:30 +0000 (09:34 -0400)
There is a handful of calls to

  scm_dynwind_begin (0);

where the parameter is an enum, scm_t_dynwind_flags.  In C++, we have no
choice but to add an explicit cast, since there is no enum value that
represents 0 (no flags set).

gdb/ChangeLog:

* guile/scm-breakpoint.c (gdbscm_set_breakpoint_stop_x): Add
scm_t_dynwind_flags casts.
* guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
* guile/scm-ports.c (gdbscm_open_memory): Likewise.
* guile/scm-value.c (gdbscm_value_to_string): Likewise.

gdb/ChangeLog
gdb/guile/scm-breakpoint.c
gdb/guile/scm-cmd.c
gdb/guile/scm-ports.c
gdb/guile/scm-value.c

index 768de09244bf25c8c2aa8614e96c4ce2b22737e1..abb4fab6f5c1f3048c2af84163b82213d11e67ff 100644 (file)
@@ -1,3 +1,11 @@
+2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * guile/scm-breakpoint.c (gdbscm_set_breakpoint_stop_x): Add
+       scm_t_dynwind_flags casts.
+       * guile/scm-cmd.c (gdbscm_parse_command_name): Likewise.
+       * guile/scm-ports.c (gdbscm_open_memory): Likewise.
+       * guile/scm-value.c (gdbscm_value_to_string): Likewise.
+
 2015-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
 
        * ax.h (ax_raw_byte): New declaration.
index 83574a3998a2fdc12850732636d040e0f58a1633..b599e238adde34d8a9206e260105b2cf1d1a7821 100644 (file)
@@ -956,7 +956,7 @@ gdbscm_set_breakpoint_stop_x (SCM self, SCM newvalue)
                        " this breakpoint."),
                      ext_lang_capitalized_name (extlang));
 
-      scm_dynwind_begin (0);
+      scm_dynwind_begin ((scm_t_dynwind_flags) 0);
       gdbscm_dynwind_xfree (error_text);
       gdbscm_out_of_range_error (FUNC_NAME, SCM_ARG1, self, error_text);
       /* The following line, while unnecessary, is present for completeness
index 900d7b0442a893b92eb10b8bc92ad4304a138450..051f0d2ca86f2d359ea7aa1126f09a7d7775a021 100644 (file)
@@ -530,7 +530,7 @@ gdbscm_parse_command_name (const char *name,
       msg = xstrprintf (_("could not find command prefix '%s'"), prefix_text);
       xfree (prefix_text);
       xfree (result);
-      scm_dynwind_begin (0);
+      scm_dynwind_begin ((scm_t_dynwind_flags) 0);
       gdbscm_dynwind_xfree (msg);
       gdbscm_out_of_range_error (func_name, arg_pos,
                                 gdbscm_scm_from_c_string (name), msg);
@@ -546,7 +546,7 @@ gdbscm_parse_command_name (const char *name,
   msg = xstrprintf (_("'%s' is not a prefix command"), prefix_text);
   xfree (prefix_text);
   xfree (result);
-  scm_dynwind_begin (0);
+  scm_dynwind_begin ((scm_t_dynwind_flags) 0);
   gdbscm_dynwind_xfree (msg);
   gdbscm_out_of_range_error (func_name, arg_pos,
                             gdbscm_scm_from_c_string (name), msg);
index ffaa3fd60328228a86a046cc2445791b855dfc98..26d43bff7ea1312bd0f770264b02b8210f3e2ca4 100644 (file)
@@ -1139,7 +1139,7 @@ gdbscm_open_memory (SCM rest)
                              &start_arg_pos, &start,
                              &size_arg_pos, &size);
 
-  scm_dynwind_begin (0);
+  scm_dynwind_begin ((scm_t_dynwind_flags) 0);
 
   if (mode == NULL)
     mode = xstrdup ("r");
index f25f7d5d487fd7bbf217ef9ad5f6891be08ddf39..851d8a779ef4291fe9684cd379694c3f3fed210f 100644 (file)
@@ -1158,7 +1158,7 @@ gdbscm_value_to_string (SCM self, SCM rest)
      Make sure we don't leak.  This is done via scm_dynwind_begin, et.al.  */
   discard_cleanups (cleanups);
 
-  scm_dynwind_begin (0);
+  scm_dynwind_begin ((scm_t_dynwind_flags) 0);
 
   gdbscm_dynwind_xfree (encoding);
   gdbscm_dynwind_xfree (buffer);
This page took 0.032944 seconds and 4 git commands to generate.