liblinear icon indicating copy to clipboard operation
liblinear copied to clipboard

MAINT get rid of compiler warnings

Open larsmans opened this issue 11 years ago • 6 comments

Here's a patch from the scikit-learn fork of Liblinear. It doesn't do much, but it shuts up the compiler.

larsmans avatar Aug 01 '14 09:08 larsmans

We knew this problem but didn't think

double Gnorm1_init = 0.;

is a good thing because some may ask why the initial norm should be set to zero. Is it better to use

double Gnorm1_init = NULL;

??

Lars Buitinck writes:

Here's a patch from the scikit-learn fork of Liblinear. It doesn't do much, but it shuts up the compiler.


You can merge this Pull Request by running

git pull https://github.com/larsmans/liblinear master

Or view, comment on, or merge it at:

https://github.com/cjlin1/liblinear/pull/3

Commit Summary

  • MAINT get rid of compiler warnings from Liblinear

File Changes

  • M linear.cpp (6)

Patch Links:

  • https://github.com/cjlin1/liblinear/pull/3.patch
  • https://github.com/cjlin1/liblinear/pull/3.diff

— Reply to this email directly or view it on GitHub.*

cjlin1 avatar Aug 23 '14 19:08 cjlin1

NULL is not a valid value for a double because it's a pointer value.

larsmans avatar Aug 23 '14 19:08 larsmans

Thanks. We plan to use -1 (rather than 0) now.

Lars Buitinck writes:

NULL is not a valid value for a double because it's a pointer value.

— Reply to this email directly or view it on GitHub.*

cjlin1 avatar Aug 29 '14 04:08 cjlin1

Do you intend to take the pull request?

simsong avatar Sep 24 '14 13:09 simsong

Sounds like a good idea, with -1 as an initial value.

wvengen avatar Feb 13 '17 11:02 wvengen

This issue was moved to angleto/liblinear#3

simsong avatar Jan 22 '18 23:01 simsong