warning fixes
This commit is contained in:
parent
4d977e9411
commit
c672f2aba5
4 changed files with 10 additions and 11 deletions
|
@ -152,8 +152,8 @@ void FGAxisEvent::fire( FGEventData & eventData )
|
|||
|
||||
FGButtonEvent::FGButtonEvent( FGInputDevice * device, SGPropertyNode_ptr node ) :
|
||||
FGInputEvent( device, node ),
|
||||
lastState(false),
|
||||
repeatable(false)
|
||||
repeatable(false),
|
||||
lastState(false)
|
||||
{
|
||||
repeatable = node->getBoolValue("repeatable", repeatable);
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ FGEventInput::~FGEventInput()
|
|||
void FGEventInput::init( )
|
||||
{
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Initializing event bindings");
|
||||
SGPropertyNode * base = fgGetNode("/input/event", true);
|
||||
// SGPropertyNode * base = fgGetNode("/input/event", true);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
* To be extended for O/S specific implementation data
|
||||
*/
|
||||
struct FGEventData {
|
||||
FGEventData( double aValue, double aDt, int aModifiers ) : value(aValue), dt(aDt), modifiers(aModifiers) {}
|
||||
FGEventData( double aValue, double aDt, int aModifiers ) : modifiers(aModifiers), value(aValue), dt(aDt) {}
|
||||
int modifiers;
|
||||
double value;
|
||||
double dt;
|
||||
|
|
|
@ -234,7 +234,7 @@ void FGJoystickInput::postinit()
|
|||
continue;
|
||||
}
|
||||
|
||||
sprintf(buf, "%d", n_but);
|
||||
sprintf(buf, "%u", (unsigned)n_but);
|
||||
SG_LOG(SG_INPUT, SG_DEBUG, "Initializing button " << n_but);
|
||||
bindings[i].buttons[n_but].init(button_node, buf, module );
|
||||
|
||||
|
|
|
@ -201,7 +201,7 @@ static struct EventTypes {
|
|||
class EventNameByType : public map<TypeCode,const char*> {
|
||||
public:
|
||||
EventNameByType() {
|
||||
for( int i = 0; i < sizeof(EVENT_TYPES)/sizeof(EVENT_TYPES[0]); i++ )
|
||||
for( unsigned i = 0; i < sizeof(EVENT_TYPES)/sizeof(EVENT_TYPES[0]); i++ )
|
||||
(*this)[EVENT_TYPES[i].typeCode] = EVENT_TYPES[i].name;
|
||||
}
|
||||
};
|
||||
|
@ -217,7 +217,7 @@ struct ltstr {
|
|||
class EventTypeByName : public map<const char *,TypeCode,ltstr> {
|
||||
public:
|
||||
EventTypeByName() {
|
||||
for( int i = 0; i < sizeof(EVENT_TYPES)/sizeof(EVENT_TYPES[0]); i++ )
|
||||
for( unsigned i = 0; i < sizeof(EVENT_TYPES)/sizeof(EVENT_TYPES[0]); i++ )
|
||||
(*this)[EVENT_TYPES[i].name] = EVENT_TYPES[i].typeCode;
|
||||
}
|
||||
};
|
||||
|
@ -226,9 +226,8 @@ static EventTypeByName EVENT_TYPE_BY_NAME;
|
|||
|
||||
FGLinuxInputDevice::FGLinuxInputDevice( string aName, string aDevname ) :
|
||||
FGInputDevice(aName),
|
||||
fd(-1),
|
||||
devname( aDevname )
|
||||
|
||||
devname( aDevname ),
|
||||
fd(-1)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -415,7 +414,7 @@ void FGLinuxEventInput::update( double dt )
|
|||
// do no more than maxpolls in a single loop to prevent locking
|
||||
int maxpolls = 100;
|
||||
while( maxpolls-- > 0 && ::poll( fds, i, 0 ) > 0 ) {
|
||||
for( int i = 0; i < sizeof(fds)/sizeof(fds[0]); i++ ) {
|
||||
for( unsigned i = 0; i < sizeof(fds)/sizeof(fds[0]); i++ ) {
|
||||
if( fds[i].revents & POLLIN ) {
|
||||
|
||||
// if this device reports data ready, it should be a input_event struct
|
||||
|
|
Loading…
Reference in a new issue