Fix "unused function" warnings reported by clang++.
* src/evtgbaparse/Makefile.am, src/ltlparse/Makefile.am, src/neverparse/Makefile.am, src/tgbaparse/Makefile.am (AM_CPPFLAGS): Define -DYY_NO_INPUT so that the unused yyinput() function does not get compiled. * src/eltlparse/Makefile.am (AM_CPPFLAGS): Likewise. (AM_CXXFLAGS): Also enable warnings. * src/eltlparse/eltlparse.yy: Move helper functions from the "%code requires" block to the "%code" block, so that they do not appear in the eltlparse.hh file (which is included in two places...). * iface/nips/nips.cc (search_error_callback_assert): Comment this unused function.
This commit is contained in:
parent
45d7c88062
commit
fe535a1594
8 changed files with 84 additions and 59 deletions
18
ChangeLog
18
ChangeLog
|
|
@ -1,5 +1,23 @@
|
|||
2011-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
Fix "unused function" warnings reported by clang++.
|
||||
|
||||
* src/evtgbaparse/Makefile.am, src/ltlparse/Makefile.am,
|
||||
src/neverparse/Makefile.am, src/tgbaparse/Makefile.am
|
||||
(AM_CPPFLAGS): Define -DYY_NO_INPUT so that the unused yyinput()
|
||||
function does not get compiled.
|
||||
* src/eltlparse/Makefile.am (AM_CPPFLAGS): Likewise.
|
||||
(AM_CXXFLAGS): Also enable warnings.
|
||||
* src/eltlparse/eltlparse.yy: Move helper functions from
|
||||
the "%code requires" block to the "%code" block, so that they
|
||||
do not appear in the eltlparse.hh file (which is included in
|
||||
two places...).
|
||||
* iface/nips/nips.cc (search_error_callback_assert): Comment
|
||||
this unused function.
|
||||
|
||||
2011-01-12 Alexandre Duret-Lutz <adl@lrde.epita.fr>
|
||||
|
||||
|
||||
Fix segfault with g++-3.3.
|
||||
|
||||
* src/tgbaalgos/minimize.cc (minimize_dfa): Fix deletion of the
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (C) 2008, 2010 Laboratoire de Recherche et Développement
|
||||
// Copyright (C) 2008, 2010, 2011 Laboratoire de Recherche et Développement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -49,18 +49,18 @@ namespace spot
|
|||
}
|
||||
|
||||
// Callback for error which fails on assertions
|
||||
nipsvm_status_t
|
||||
search_error_callback_assert(nipsvm_errorcode_t err, nipsvm_pid_t pid,
|
||||
nipsvm_pc_t pc, void *)
|
||||
{
|
||||
char str[256];
|
||||
|
||||
nipsvm_errorstring (str, sizeof str, err, pid, pc);
|
||||
std::cerr << "RUNTIME ERROR (" << err << "): " << str << std::endl;
|
||||
|
||||
throw nips_exception(std::string(str), static_cast<int>(err));
|
||||
return IC_STOP;
|
||||
}
|
||||
// nipsvm_status_t
|
||||
// search_error_callback_assert(nipsvm_errorcode_t err, nipsvm_pid_t pid,
|
||||
// nipsvm_pc_t pc, void *)
|
||||
// {
|
||||
// char str[256];
|
||||
//
|
||||
// nipsvm_errorstring (str, sizeof str, err, pid, pc);
|
||||
// std::cerr << "RUNTIME ERROR (" << err << "): " << str << std::endl;
|
||||
//
|
||||
// throw nips_exception(std::string(str), static_cast<int>(err));
|
||||
// return IC_STOP;
|
||||
// }
|
||||
|
||||
// state_nips
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
## Copyright (C) 2008 Laboratoire de Recherche et Développement
|
||||
## Copyright (C) 2008, 2011 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
##
|
||||
## This file is part of Spot, a model checking library.
|
||||
|
|
@ -18,8 +18,9 @@
|
|||
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/..
|
||||
AM_CXXFLAGS = #$(WARNING_CXXFLAGS)
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. -DYY_NO_INPUT
|
||||
# Disable -Werror because too many versions of flex yield warnings.
|
||||
AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=)
|
||||
|
||||
eltlparsedir = $(pkgincludedir)/eltlparse
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (C) 2008, 2009, 2010 Laboratoire de Recherche et
|
||||
/* Copyright (C) 2008, 2009, 2010, 2011 Laboratoire de Recherche et
|
||||
** Développement de l'Epita (LRDE).
|
||||
**
|
||||
** This file is part of Spot, a model checking library.
|
||||
|
|
@ -56,7 +56,43 @@ namespace spot
|
|||
parse_error_list list_;
|
||||
std::string file_;
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
%parse-param {spot::eltl::nfamap& nmap}
|
||||
%parse-param {spot::eltl::aliasmap& amap}
|
||||
%parse-param {spot::eltl::parse_error_list_t &pe}
|
||||
%parse-param {spot::ltl::environment &parse_environment}
|
||||
%parse-param {spot::ltl::formula* &result}
|
||||
%lex-param {spot::eltl::parse_error_list_t &pe}
|
||||
%expect 0
|
||||
%pure-parser
|
||||
%union
|
||||
{
|
||||
int ival;
|
||||
std::string* sval;
|
||||
spot::ltl::nfa* nval;
|
||||
spot::ltl::automatop::vec* aval;
|
||||
spot::ltl::formula* fval;
|
||||
|
||||
/// To handle aliases.
|
||||
spot::ltl::formula_tree::node* pval;
|
||||
spot::ltl::formula_tree::node_nfa* bval;
|
||||
}
|
||||
|
||||
%code {
|
||||
/* ltlparse.hh and parsedecl.hh include each other recursively.
|
||||
We mut ensure that YYSTYPE is declared (by the above %union)
|
||||
before parsedecl.hh uses it. */
|
||||
#include "parsedecl.hh"
|
||||
using namespace spot::eltl;
|
||||
using namespace spot::ltl;
|
||||
|
||||
namespace spot
|
||||
{
|
||||
namespace eltl
|
||||
{
|
||||
using namespace spot::ltl::formula_tree;
|
||||
|
||||
/// Alias an existing alias, as in Strong=G(F($0))->G(F($1)),
|
||||
|
|
@ -159,36 +195,6 @@ namespace spot
|
|||
|
||||
}
|
||||
|
||||
%parse-param {spot::eltl::nfamap& nmap}
|
||||
%parse-param {spot::eltl::aliasmap& amap}
|
||||
%parse-param {spot::eltl::parse_error_list_t &pe}
|
||||
%parse-param {spot::ltl::environment &parse_environment}
|
||||
%parse-param {spot::ltl::formula* &result}
|
||||
%lex-param {spot::eltl::parse_error_list_t &pe}
|
||||
%expect 0
|
||||
%pure-parser
|
||||
%union
|
||||
{
|
||||
int ival;
|
||||
std::string* sval;
|
||||
spot::ltl::nfa* nval;
|
||||
spot::ltl::automatop::vec* aval;
|
||||
spot::ltl::formula* fval;
|
||||
|
||||
/// To handle aliases.
|
||||
spot::ltl::formula_tree::node* pval;
|
||||
spot::ltl::formula_tree::node_nfa* bval;
|
||||
}
|
||||
|
||||
%code {
|
||||
/* ltlparse.hh and parsedecl.hh include each other recursively.
|
||||
We mut ensure that YYSTYPE is declared (by the above %union)
|
||||
before parsedecl.hh uses it. */
|
||||
#include "parsedecl.hh"
|
||||
using namespace spot::eltl;
|
||||
using namespace spot::ltl;
|
||||
}
|
||||
|
||||
/* All tokens. */
|
||||
|
||||
%token <sval> ATOMIC_PROP "atomic proposition"
|
||||
|
|
@ -455,7 +461,7 @@ subformula: ATOMIC_PROP
|
|||
nfa::ptr np = nmap[*$1];
|
||||
|
||||
/// Easily handle deletion of $3 when CHECK_ARITY fails.
|
||||
int i = $3->size();
|
||||
unsigned i = $3->size();
|
||||
if ($3->size() != np->arity())
|
||||
{
|
||||
automatop::vec::iterator it = $3->begin();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
## Copyright (C) 2008, 2009 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
## Copyright (C) 2008, 2009, 2011 Laboratoire de Recherche et
|
||||
## Développement de l'Epita (LRDE).
|
||||
## Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6
|
||||
## (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
|
||||
## Pierre et Marie Curie.
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS)
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) -DYY_NO_INPUT
|
||||
# Disable -Werror because too many versions of flex yield warnings.
|
||||
AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
## Copyright (C) 2008, 2009, 2010 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
## Copyright (C) 2008, 2009, 2010, 2011 Laboratoire de Recherche et
|
||||
## Développement de l'Epita (LRDE).
|
||||
## Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris
|
||||
## 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
## Université Pierre et Marie Curie.
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/..
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. -DYY_NO_INPUT
|
||||
# Disable -Werror because too many versions of flex yield warnings.
|
||||
AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
## Copyright (C) 2010 Laboratoire de Recherche et Développement
|
||||
## Copyright (C) 2010, 2011 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
##
|
||||
## This file is part of Spot, a model checking library.
|
||||
|
|
@ -18,7 +18,7 @@
|
|||
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS)
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) -DYY_NO_INPUT
|
||||
# Disable -Werror because too many versions of flex yield warnings.
|
||||
AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
## Copyright (C) 2008, 2009 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
## Copyright (C) 2008, 2009, 2011 Laboratoire de Recherche et
|
||||
## Développement de l'Epita (LRDE).
|
||||
## Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de
|
||||
## Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
## Université Pierre et Marie Curie.
|
||||
|
|
@ -21,7 +21,7 @@
|
|||
## Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
## 02111-1307, USA.
|
||||
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS)
|
||||
AM_CPPFLAGS = -I$(srcdir)/.. $(BUDDY_CPPFLAGS) -DYY_NO_INPUT
|
||||
# Disable -Werror because too many versions of flex yield warnings.
|
||||
AM_CXXFLAGS = $(WARNING_CXXFLAGS:-Werror=)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue