From: Pedro Alves Date: Thu, 29 Oct 2015 12:55:01 +0000 (+0000) Subject: Add cast to exception_none X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=44a8b4df1d6f5b8096f01787751fd51c42e78fc6;p=binutils-gdb.git Add cast to exception_none Fixes, in C++ mode: ../../src/gdb/common/common-exceptions.c:23:69: error: invalid conversion from ‘int’ to ‘return_reason’ [-fpermissive] const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL }; ^ (I considered adding an enum value for '0', but the code and comments around return_reason and its uses explain how 0 is special/internal, so I'm leaving it be.) gdb/ChangeLog: 2015-10-29 Pedro Alves * common/common-exceptions.c (exception_none): Add cast. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 0bb06aea030..66f6dd6439d 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2015-10-29 Pedro Alves + + * common/common-exceptions.c (exception_none): Add cast. + 2015-10-29 Pedro Alves * compile/compile-c-types.c (struct type_map_instance) diff --git a/gdb/common/common-exceptions.c b/gdb/common/common-exceptions.c index 8ee96aba528..ce476a257b1 100644 --- a/gdb/common/common-exceptions.c +++ b/gdb/common/common-exceptions.c @@ -20,7 +20,7 @@ #include "common-defs.h" #include "common-exceptions.h" -const struct gdb_exception exception_none = { 0, GDB_NO_ERROR, NULL }; +const struct gdb_exception exception_none = { (enum return_reason) 0, GDB_NO_ERROR, NULL }; #ifndef __cplusplus