fix some warnings

This commit is contained in:
Fischlurch 2008-09-05 17:01:24 +02:00
parent 12c651f4ed
commit 43291cb9cc
8 changed files with 16 additions and 11 deletions

View file

@ -52,7 +52,7 @@ namespace util
/** create as a tokenized <i>copy</i> of the current commandline.
* Note that argv[0] is allways ignored. */
Cmdline::Cmdline (int argc, char* argv[])
Cmdline::Cmdline (int argc, const char** argv)
: vector<string> (noneg(argc-1))
{
for (int i=1; i<argc; ++i)

View file

@ -48,7 +48,7 @@ namespace util
class Cmdline : public VectS
{
public:
Cmdline (int argc, char* argv[]);
Cmdline (int argc, const char** argv);
explicit Cmdline (const string cmdline);
operator string () const;

View file

@ -128,10 +128,12 @@ namespace lumiera
{
const Error* err=dynamic_cast<const Error*> (&cause);
if (err)
if (isnil (err->cause_))
return cause.what(); // cause is root cause
else
return err->cause_; // cause was caused by another exception
{
if (isnil (err->cause_))
return cause.what(); // cause is root cause
else
return err->cause_; // cause was caused by another exception
}
// unknown other exception type
return cause.what ();

View file

@ -38,7 +38,9 @@ namespace asset
*/
Category::operator string () const
{
char *kinds[6] = { "AUDIO"
typedef const char * const SymID;
SymID kinds[6] = { "AUDIO"
, "VIDEO"
, "EFFECT"
, "CODEC"

View file

@ -53,6 +53,7 @@ namespace mobject
using boost::lambda::var;
namespace // Implementation details //////////////////TODO better a named implementation namespace (avoids warnings on gcc 4.3)
//////////////////////////////////////////////////////////FIXME this is a *real* problem, because this namespace create storage, which it shouldn't
{
struct TableEntry
{

View file

@ -34,7 +34,7 @@ using lumiera::ON_GLOBAL_SHUTDOWN;
* cmd line argument.
* Note: to ease debugging, we don't catch any exceptions.
*/
int main (int argc, char* argv[])
int main (int argc, const char* argv[])
{
util::Cmdline args (argc,argv);
test::TestOption optparser (args);

View file

@ -50,11 +50,11 @@ namespace lumiera
class TestSingletonO
{
int callCnt;
char* typid;
Symbol typid;
format msg;
public:
TestSingletonO(char* ty="TestSingletonO")
TestSingletonO(Symbol ty="TestSingletonO")
: callCnt (0), typid(ty), msg ("%s::doIt() call=%d\n")
{
TRACE (singleton, "ctor %s", typid);

View file

@ -85,7 +85,7 @@ namespace util
*/
void testStandardCmdlineformat()
{
char* fakeArg[3] = {"CMD", "one ", "two"};
const char* fakeArg[3] = {"CMD", "one ", "two"};
Cmdline theCmdline(3, fakeArg);
cout << "Standard Cmdlineformat:" << theCmdline << "\n";
}