#223 add missing return (detected by gcc 11)

This commit is contained in:
Louis Rubet 2022-02-05 14:01:20 +01:00
parent 5e16332c54
commit df7f5e4660
3 changed files with 6 additions and 4 deletions

View file

@ -44,11 +44,11 @@ struct floating_t {
mpfr_custom_move(mpfr, significand); mpfr_custom_move(mpfr, significand);
} }
floating_t& operator=(const double val) { mpfr_set_d(mpfr, val, s_mpfr_rnd); } floating_t& operator=(const double val) { mpfr_set_d(mpfr, val, s_mpfr_rnd); return *this; }
floating_t& operator=(const long int val) { mpfr_set_si(mpfr, val, s_mpfr_rnd); } floating_t& operator=(const long int val) { mpfr_set_si(mpfr, val, s_mpfr_rnd); return *this; }
floating_t& operator=(const unsigned long val) { mpfr_set_ui(mpfr, val, s_mpfr_rnd); } floating_t& operator=(const unsigned long val) { mpfr_set_ui(mpfr, val, s_mpfr_rnd); return *this; }
operator double() { return mpfr_get_d(mpfr, s_mpfr_rnd); } operator double() { return mpfr_get_d(mpfr, s_mpfr_rnd); }

View file

@ -1,4 +1,4 @@
#include "program.hpp" #include "program.hpp"
//< return type strings //< return type strings
const char* program::s_ret_value_string[ret_max] = RET_VALUE_STRINGS; const char* program::s_ret_value_string[ret_max] = RET_VALUE_STRINGS;

View file

@ -306,6 +306,8 @@ class heap : public stack {
ret = true; ret = true;
} }
} }
return ret;
} }
/// @brief whether a variable exists in heap or not /// @brief whether a variable exists in heap or not