Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation warnings with the newest libmatio #21

Open
arcan1s opened this issue Feb 29, 2016 · 2 comments
Open

Compilation warnings with the newest libmatio #21

arcan1s opened this issue Feb 29, 2016 · 2 comments

Comments

@arcan1s
Copy link
Contributor

arcan1s commented Feb 29, 2016

Hi,

With the newest libmatio I've faced with the following compilation warnings:

Scanning dependencies of target aslmatio
[ 47%] Building CXX object src/CMakeFiles/aslmatio.dir/utilities/aslMATLABCasters.cxx.o
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx: In instantiation of ‘matvar_t* matiocpp::Var::init(T*, const asl::AVec<int>&, const string&) [with T = double; matvar_t = matvar_t; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:93:19:   required from ‘matiocpp::Var::Var(T*, unsigned int, const string&, bool) [with T = double; std::__cxx11::string = std::__cxx11::basic_string<char>]’
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:116:62:   required from here
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:76:22: warning: invalid conversion from ‘int’ to ‘matio_classes’ [-fpermissive]
  return Mat_VarCreate(name.c_str(),
                      ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:33:0:
/usr/include/matio.h:258:19: note:   initializing argument 2 of ‘matvar_t* Mat_VarCreate(const char*, matio_classes, matio_types, int, size_t*, void*, int)’
 EXTERN matvar_t  *Mat_VarCreate(const char *name,enum matio_classes class_type,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:76:22: warning: invalid conversion from ‘int’ to ‘matio_types’ [-fpermissive]
  return Mat_VarCreate(name.c_str(),
                      ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:33:0:
/usr/include/matio.h:258:19: note:   initializing argument 3 of ‘matvar_t* Mat_VarCreate(const char*, matio_classes, matio_types, int, size_t*, void*, int)’
 EXTERN matvar_t  *Mat_VarCreate(const char *name,enum matio_classes class_type,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx: In instantiation of ‘matvar_t* matiocpp::Var::init(T*, const asl::AVec<int>&, const string&) [with T = float; matvar_t = matvar_t; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:93:19:   required from ‘matiocpp::Var::Var(T*, unsigned int, const string&, bool) [with T = float; std::__cxx11::string = std::__cxx11::basic_string<char>]’
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:122:62:   required from here
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:76:22: warning: invalid conversion from ‘int’ to ‘matio_classes’ [-fpermissive]
  return Mat_VarCreate(name.c_str(),
                      ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:33:0:
/usr/include/matio.h:258:19: note:   initializing argument 2 of ‘matvar_t* Mat_VarCreate(const char*, matio_classes, matio_types, int, size_t*, void*, int)’
 EXTERN matvar_t  *Mat_VarCreate(const char *name,enum matio_classes class_type,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:76:22: warning: invalid conversion from ‘int’ to ‘matio_types’ [-fpermissive]
  return Mat_VarCreate(name.c_str(),
                      ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:33:0:
/usr/include/matio.h:258:19: note:   initializing argument 3 of ‘matvar_t* Mat_VarCreate(const char*, matio_classes, matio_types, int, size_t*, void*, int)’
 EXTERN matvar_t  *Mat_VarCreate(const char *name,enum matio_classes class_type,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx: In instantiation of ‘matvar_t* matiocpp::Var::init(T*, const asl::AVec<int>&, const string&) [with T = int; matvar_t = matvar_t; std::__cxx11::string = std::__cxx11::basic_string<char>]’:
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:93:19:   required from ‘matiocpp::Var::Var(T*, unsigned int, const string&, bool) [with T = int; std::__cxx11::string = std::__cxx11::basic_string<char>]’
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:128:62:   required from here
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:76:22: warning: invalid conversion from ‘int’ to ‘matio_classes’ [-fpermissive]
  return Mat_VarCreate(name.c_str(),
                      ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:33:0:
/usr/include/matio.h:258:19: note:   initializing argument 2 of ‘matvar_t* Mat_VarCreate(const char*, matio_classes, matio_types, int, size_t*, void*, int)’
 EXTERN matvar_t  *Mat_VarCreate(const char *name,enum matio_classes class_type,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:76:22: warning: invalid conversion from ‘int’ to ‘matio_types’ [-fpermissive]
  return Mat_VarCreate(name.c_str(),
                      ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/utilities/aslMATLABCasters.cxx:33:0:
/usr/include/matio.h:258:19: note:   initializing argument 3 of ‘matvar_t* Mat_VarCreate(const char*, matio_classes, matio_types, int, size_t*, void*, int)’
 EXTERN matvar_t  *Mat_VarCreate(const char *name,enum matio_classes class_type,
                   ^
[ 47%] Building CXX object src/CMakeFiles/aslmatio.dir/writers/aslMATFormat.cxx.o
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx: In function ‘void asl::writeMAT(const string&, const asl::AbstractData&, const string&)’:
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:49:35: warning: invalid conversion from ‘int’ to ‘matio_compression’ [-fpermissive]
   Mat_VarWrite(matFile,var->var, 0);
                                   ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:26:0:
/usr/include/matio.h:300:19: note:   initializing argument 3 of ‘int Mat_VarWrite(mat_t*, matvar_t*, matio_compression)’
 EXTERN int        Mat_VarWrite(mat_t *mat,matvar_t *matvar,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx: In function ‘void asl::writeMAT(const string&, std::vector<std::pair<std::shared_ptr<asl::AbstractData>, std::__cxx11::basic_string<char> > >)’:
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:66:36: warning: invalid conversion from ‘int’ to ‘matio_compression’ [-fpermissive]
    Mat_VarWrite(matFile,var->var, 0);
                                    ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:26:0:
/usr/include/matio.h:300:19: note:   initializing argument 3 of ‘int Mat_VarWrite(mat_t*, matvar_t*, matio_compression)’
 EXTERN int        Mat_VarWrite(mat_t *mat,matvar_t *matvar,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx: In function ‘void asl::writeMAT(const string&, std::vector<std::pair<std::shared_ptr<acl::ElementBase>, std::__cxx11::basic_string<char> > >)’:
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:78:36: warning: invalid conversion from ‘int’ to ‘matio_compression’ [-fpermissive]
    Mat_VarWrite(matFile,var->var, 0);
                                    ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:26:0:
/usr/include/matio.h:300:19: note:   initializing argument 3 of ‘int Mat_VarWrite(mat_t*, matvar_t*, matio_compression)’
 EXTERN int        Mat_VarWrite(mat_t *mat,matvar_t *matvar,
                   ^
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx: In function ‘void asl::writeMAT(const string&, asl::Probe&, unsigned int, const string&)’:
/home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:89:35: warning: invalid conversion from ‘int’ to ‘matio_compression’ [-fpermissive]
   Mat_VarWrite(matFile,var->var, 0);
                                   ^
In file included from /home/arcanis/libasl/src/ASL-0.1.6/src/writers/aslMATFormat.cxx:26:0:
/usr/include/matio.h:300:19: note:   initializing argument 3 of ‘int Mat_VarWrite(mat_t*, matvar_t*, matio_compression)’
 EXTERN int        Mat_VarWrite(mat_t *mat,matvar_t *matvar,
                   ^
[ 48%] Linking CXX shared library libaslmatio.so

Most of them are talking about invalid conversion from int to matio_*. Build environment:

gcc-5.3.0
libmatio-1.5.6
libasl from tarball (0.1.6)

@AvtechScientific
Copy link
Owner

Thank you, @arcan1s , for the report. matio changes its API from time to time. We will look into it, but as long as they are only warnings - the issue doesn't seem to be a critical one.

All the best!

@tbeu
Copy link

tbeu commented Aug 14, 2017

The matio API actually was kept backward-compatible since release of v1.5.0 (spring 2012).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants