3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Fixed warnings produced by gcc 4.6.3 when compiling in debug mode

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-30 23:43:00 -07:00
parent b1ce9f796c
commit d8f627c6c8
53 changed files with 116 additions and 121 deletions

View file

@ -68,7 +68,11 @@ bool is_debug_enabled(const char * tag);
#define MAKE_NAME2(LINE) zofty_ ## LINE
#define MAKE_NAME(LINE) MAKE_NAME2(LINE)
#define DBG_UNIQUE_NAME MAKE_NAME(__LINE__)
#ifdef __GNUC__
#define COMPILE_TIME_ASSERT(expr) extern __attribute__((unused)) char DBG_UNIQUE_NAME[expr]
#else
#define COMPILE_TIME_ASSERT(expr) extern char DBG_UNIQUE_NAME[expr]
#endif
template<class T>
class class_invariant

View file

@ -1041,7 +1041,7 @@ private:
for (unsigned i = 0; i < edges.size(); ++i) {
potential0 += m_edges[edges[i]].get_weight();
numeral potential1 = potentials[i];
// numeral potential1 = potentials[i];
if (potential0 != potentials[i] ||
nodes[i] != m_edges[edges[i]].get_source()) {
TRACE("diff_logic_traverse", tout << "checking index " << i << " ";

View file

@ -24,7 +24,9 @@ Revision History:
#pragma fp_contract(off) // contractions off (`contraction' means x*y+z is turned into a fused-mul-add).
#pragma fenv_access(on) // fpu environment sensitivity (needed to be allowed to make FPU mode changes).
#else
#ifdef _WINDOWS
#pragma STDC FENV_ACCESS ON
#endif
#include <math.h>
#include <fenv.h>
#endif

View file

@ -91,6 +91,8 @@ void disable_error_msg_prefix() {
g_show_error_msg_prefix = false;
}
#if 0
// [Leo]: Do we need this?
static void string2ostream(std::ostream& out, char const* msg) {
svector<char> buff;
buff.resize(10);
@ -104,6 +106,7 @@ static void string2ostream(std::ostream& out, char const* msg) {
END_ERR_HANDLER();
out << buff.c_ptr();
}
#endif
void format2ostream(std::ostream & out, char const* msg, va_list args) {
svector<char> buff;
@ -147,14 +150,14 @@ void format2ostream(std::ostream & out, char const* msg, va_list args) {
void print_msg(std::ostream * out, const char* prefix, const char* msg, va_list args) {
if (out) {
string2ostream(*out, prefix);
*out << prefix;
format2ostream(*out, msg, args);
string2ostream(*out, "\n");
*out << "\n";
out->flush();
}
else {
FILE * f = g_use_std_stdout ? stdout : stderr;
fprintf(f, prefix);
fprintf(f, "%s", prefix);
vfprintf(f, msg, args);
fprintf(f, "\n");
fflush(f);