Skip to content
This repository has been archived by the owner on Aug 4, 2020. It is now read-only.

xively Library does not compile in Arduino 1.6.5 #28

Open
TheTechnoGuy opened this issue Oct 12, 2015 · 0 comments
Open

xively Library does not compile in Arduino 1.6.5 #28

TheTechnoGuy opened this issue Oct 12, 2015 · 0 comments

Comments

@TheTechnoGuy
Copy link

The library does not compile using Arduino 1.6.5. I count 9 warnings and 2 errors.
Here is output from the compiler.

In file included from C:\Users\username\Documents\Arduino\libraries\xively/Xively.h:2:0,
from XivelyTutorial.ino:8:
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h: In member function 'char XivelyDatastream::idChar(int)':
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:43:90: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return (_idType == DATASTREAM_STRING ? _idString[idx] : (idx > strlen(_idBuffer._buffer) ? '\0' : _idBuffer._buffer[idx]));
^

In file included from C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:1:0:
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h: In member function 'char XivelyDatastream::idChar(int)':
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:43:90: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
return (_idType == DATASTREAM_STRING ? _idString[idx] : (idx > strlen(_idBuffer._buffer) ? '\0' : _idBuffer._buffer[idx]));
^

C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h: In constructor 'XivelyDatastream::XivelyDatastream(String&, int)':
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:52:6: warning: 'XivelyDatastream::_valueType' will be initialized after [-Wreorder]
int _valueType;
^

C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:50:9: warning: 'String XivelyDatastream::_idString' [-Wreorder]
String _idString;
^

C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:5:1: warning: when initialized here [-Wreorder]
XivelyDatastream::XivelyDatastream(String& aId, int aType)
^

In file included from C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:1:0:
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h: In constructor 'XivelyDatastream::XivelyDatastream(char*, int, int)':
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:52:6: warning: 'XivelyDatastream::_valueType' will be initialized after [-Wreorder]
int _valueType;
^

C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:50:9: warning: 'String XivelyDatastream::_idString' [-Wreorder]
String _idString;
^

C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:10:1: warning: when initialized here [-Wreorder]
XivelyDatastream::XivelyDatastream(char* aIdBuffer, int aIdBufferSize, int aType)
^

In file included from C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:1:0:
C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp: In member function 'int XivelyDatastream::updateValue(Stream&)':
C:\Users\username\Documents\Arduino\libraries\xively/XivelyDatastream.h:7:27: error: jump to case label [-fpermissive]

define DATASTREAM_STRING 0

^

C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:42:7: note: in expansion of macro 'DATASTREAM_STRING'
case DATASTREAM_STRING:
^

C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:38:7: error: crosses initialization of 'int len'
int len = aStream.readBytesUntil('\n', _value._valueBuffer._buffer, _value._valueBuffer._bufferSize);
^

C:\Users\username\Documents\Arduino\libraries\xively\XivelyDatastream.cpp:54:1: warning: no return statement in function returning non-void [-Wreturn-type]
}
^

Error compiling.

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

No branches or pull requests

1 participant