[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[therion-users] Re: therion does a seg fault when I try and run it
From: |
Michael Lake |
Subject: |
[therion-users] Re: therion does a seg fault when I try and run it |
Date: |
Fri, 05 Sep 2003 14:22:11 +1000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux alpha; en-US; rv:1.0.0) Gecko/20020622 Debian/1.0.0-0.woody.1 |
Hi
I have been looking at the problem of the compilation on the PowerPC
and started looking at some of the compilation errors too.
1.
thpoint.cxx:446: warning: `.' not followed by `*' or digit in format
thats because you have at this line the following...
sprintf(buff,"%0.f",this->xsize);
should that be instead the following?
sprintf(buff,"%.0f",this->xsize);
2.
The following is more serious.
thpoint.cxx:731: warning: assignment of negative value `-1' to `char'
void thpoint_parse_value(int & sv, double & dv, bool & qw, char & sign,
char * str)
and later on....
case '-':
sign = -1;
str++;
break;
OK my programming skills are rudimentary but if you assign a negative
value to
a character pointer then the variable will give a different value depending
whether the operating system is 32 or 64 bit. My Alpha is 64 bit.
The compiler warns about it and rightly so.
3. I have tracked down where the strange string comes from when I run
./therion -v
therion$ ./therion -v
therion gduxs:l:qLvhip:
it's from thcmdline.cxx where it uses the getopt routines.
oc = getopt_long (argc, argv, "gduxs:l:qLvhip:",
thlong_options, &oindex);
I read the man 3 page on getopt and so now I know what the
gduxs:l:qLvhip: string is -- never used getopt myself.
So somehow instead of the version string being returned its returning
the argument to the getopt_long function ! eeeewwww :-)
The version of getopt on my Ti PowerBook here running Debian 3.0 is
therion$ getopt --version
getopt (enhanced) 1.1.2
Mike
--
Mike Lake
Caver, Linux enthusiast and interested in anything technical.
Re: [therion-users] Re: therion does a seg fault when I try and run it, Stacho Mudrak, 2003/09/05