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

Errors while doing make #2

Open
hazrasudip9 opened this issue Apr 17, 2017 · 4 comments
Open

Errors while doing make #2

hazrasudip9 opened this issue Apr 17, 2017 · 4 comments

Comments

@hazrasudip9
Copy link

error: invalid initialization of non-const reference of type ‘long long int&’ from an rvalue of type ‘long long int’

@kevina
Copy link
Owner

kevina commented Apr 18, 2017

Could I have the complete error message with line numbers, also what compiler are you using.

@hazrasudip9
Copy link
Author

syncfs.cpp: In function ‘int syncfs_readdir(const char*, void*, fuse_fill_dir_t, off_t, fuse_file_info*)’:
syncfs.cpp:1027:34: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 4 has type ‘off_t {aka long int}’ [-Wformat=]
buf, filler, offset, fi);
^
syncfs.cpp: In function ‘int pending_read(char*, size_t, off_t, fuse_file_info*)’:
syncfs.cpp:1641:14: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (offset >= len)
^
In file included from syncfs.cpp:55:0:
sqlite3.hpp: In instantiation of ‘void SqlResult::get0(int, T&, Ts& ...) [with T = long unsigned int; Ts = {const char*}]’:
sqlite3.hpp:169:5: recursively required from ‘void SqlResult::get0(int, T&, Ts& ...) [with T = bool; Ts = {long int, long unsigned int, const char*}]’
sqlite3.hpp:169:5: required from ‘void SqlResult::get0(int, T&, Ts& ...) [with T = std::__cxx11::basic_string; Ts = {bool, long int, long unsigned int, const char*}]’
sqlite3.hpp:174:5: required from ‘void SqlResult::get(Ts& ...) [with Ts = {std::__cxx11::basic_string<char, std::char_traits, std::allocator >, bool, long int, long unsigned int, const char*}]’
syncfs.cpp:1230:86: required from here
sqlite3.hpp:168:5: error: no matching function for call to ‘get_column(int&, long unsigned int&)’
get_column(idx, arg);
^
In file included from syncfs.cpp:55:0:
sqlite3.hpp:191:8: note: candidate: void SqlResult::get_column(int, const char*&)
void get_column(int idx, const char * & val) {val = (const char )sqlite3_col
^
sqlite3.hpp:191:8: note: conversion of argument 2 would be ill-formed:
In file included from syncfs.cpp:55:0:
sqlite3.hpp:168:5: error: invalid conversion from ‘long unsigned int’ to ‘const char
’ [-fpermissive]
get_column(idx, arg);
^
sqlite3.hpp:168:5: error: cannot bind rvalue ‘(const char*)arg’ to ‘const char*&’
In file included from syncfs.cpp:55:0:
sqlite3.hpp:197:8: note: candidate: void SqlResult::get_column(int, bool&)
void get_column(int idx, bool & val) {val = (bool)sqlite3_column_int(stmt, id
^
sqlite3.hpp:197:8: note: conversion of argument 2 would be ill-formed:
In file included from syncfs.cpp:55:0:
sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘bool&’ from an rvalue of type ‘bool’
get_column(idx, arg);
^
In file included from syncfs.cpp:55:0:
sqlite3.hpp:198:8: note: candidate: void SqlResult::get_column(int, int&)
void get_column(int idx, int & val) {val = sqlite3_column_int(stmt, idx);};
^
sqlite3.hpp:198:8: note: conversion of argument 2 would be ill-formed:
In file included from syncfs.cpp:55:0:
sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘int&’ from an rvalue of type ‘int’
get_column(idx, arg);
^
In file included from syncfs.cpp:55:0:
sqlite3.hpp:199:8: note: candidate: void SqlResult::get_column(int, unsigned int&)
void get_column(int idx, unsigned int & val) {val = sqlite3_column_int(stmt,
^
sqlite3.hpp:199:8: note: conversion of argument 2 would be ill-formed:
In file included from syncfs.cpp:55:0:
sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘unsigned int&’ from an rvalue of type ‘unsigned int’
get_column(idx, arg);
^
In file included from syncfs.cpp:55:0:
sqlite3.hpp:200:8: note: candidate: void SqlResult::get_column(int, long int&)
void get_column(int idx, long int & val) {val = (long int)sqlite3_column_int6
^
sqlite3.hpp:200:8: note: conversion of argument 2 would be ill-formed:
In file included from syncfs.cpp:55:0:
sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘long int&’ from an rvalue of type ‘long int’
get_column(idx, arg);
^
In file included from syncfs.cpp:55:0:
sqlite3.hpp:201:8: note: candidate: void SqlResult::get_column(int, long long int&)
void get_column(int idx, long long int & val) {val = (long int)sqlite3_column
^
sqlite3.hpp:201:8: note: conversion of argument 2 would be ill-formed:
In file included from syncfs.cpp:55:0:
sqlite3.hpp:168:5: error: invalid initialization of non-const reference of type ‘long long int&’ from an rvalue of type ‘long long int’
get_column(idx, arg);
^
make: *** [syncfs.o] Error 1

@hazrasudip9
Copy link
Author

I am using GCC version
gcc (Ubuntu 5.4.1-2ubuntu1~16.04) 5.4.1 20160904

. What changes to the make file needs to be done?

@kevina
Copy link
Owner

kevina commented Apr 18, 2017

Gcc 5.4.1 may not support enough of C++11 you might need to upgrade to a newer version. See the README.

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

2 participants