Summary: | included plugin linefit does not compile | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Matthew Truch <matt> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Matthew Truch
2003-09-25 14:53:19 UTC
Subject: Re: [Kst] New: included plugin linefit does not compile On Thursday 25 September 2003 08:53, Matthew Truch wrote: > I was unable to compile the linefit plugin for kst included in the source > tree. > > Below is output from gcc: > > [matt@cherry linefit]$ make linefit > gcc -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith > -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 > -Wformat-security -Wmissing-format-attribute -DQT_THREAD_SUPPORT > -D_REENTRANT linefit.c -o linefit > linefit.c:19: warning: no previous prototype for `linefit' > linefit.c: In function `linefit': > linefit.c:51: warning: implicit declaration of function `lrint' > linefit.c:16: warning: unused parameter `is' > /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In > function `_start': ../sysdeps/i386/elf/start.S:77: undefined reference to > `main' Funny, I just realised this would happen to someone last night. lrint() is in C99 only. I'll commit a fix shortly. Subject: kdeextragear-2/kst/plugins/linefit CVS commit by staikos: lrint() not portable enough. rint() should be sufficient here anyways. CCMAIL: 64926-done@bugs.kde.org M +10 -2 linefit.c 1.9 --- kdeextragear-2/kst/plugins/linefit/linefit.c #1.8:1.9 @@ -13,4 +13,10 @@ #define Y 1 + +int linefit(const double *const inArrays[], const int inArrayLens[], + const double is[], + double *outArrays[], int outArrayLens[], + double outScalars[]); + int linefit(const double *const inArrays[], const int inArrayLens[], const double is[], @@ -22,4 +28,6 @@ int linefit(const double *const inArrays double xScale; + if (is) {} /* don't warn */ + if (inArrayLens[Y] < 1 || inArrayLens[X] < 1) { return -1; @@ -49,5 +57,5 @@ int linefit(const double *const inArrays for (i = 0; i < inArrayLens[Y]; i++) { double z = xScale*i; - long int idx = lrint(z); + long int idx = rint(z); double skew = z - floor(z); /* [0..1] */ long int idx2 = idx + 1; @@ -79,5 +87,5 @@ int linefit(const double *const inArrays for (i = 0; i < inArrayLens[X]; i++) { double z = xScale*i; - long int idx = lrint(z); + long int idx = rint(z); double skew = z - floor(z); /* [0..1] */ long int idx2 = idx + 1; Subject: Re: [Kst] New: included plugin linefit does not compile On Thursday 25 September 2003 08:53, Matthew Truch wrote: > I was unable to compile the linefit plugin for kst included in the source > tree. > > Below is output from gcc: > > [matt@cherry linefit]$ make linefit > gcc -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith > -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2 > -Wformat-security -Wmissing-format-attribute -DQT_THREAD_SUPPORT > -D_REENTRANT linefit.c -o linefit One note, the makefile there will not build the plugin. It probably shouldn't be there. Please read the README for how to compile the plugin properly. |