tomasdecamino / RobotKit

3 stars 3 forks source link

Definición de método "changePin" no es ISO C++ #1

Closed fr4gus closed 7 years ago

fr4gus commented 7 years ago

En la clase IRremote, la definicion del método changePin (linea 176 de IRremote.h) no tiene un tipo de retorno para el método. En Windows 8, el compilador de C++ parece no tener problemas. En MacOSX (El Capitan), el compilador si tira el siguiente warning:

In file included from /Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/RobotKit.h:11:0,
                 from /Volumes/F4MBP/Users/fr4gus/Documents/Arduino/test/test.ino:1:
/Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/IRremote.h:176:20: warning: ISO C++ forbids declaration of 'changePin' with no type [-fpermissive]
   changePin(int pin);
                    ^
In file included from /Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/IRremote.cpp:25:0:
/Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/IRremote.h:176:20: warning: ISO C++ forbids declaration of 'changePin' with no type [-fpermissive]
   changePin(int pin);
                    ^
In file included from /Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/irRecv.cpp:1:0:
/Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/IRremote.h:176:20: warning: ISO C++ forbids declaration of 'changePin' with no type [-fpermissive]
   changePin(int pin);
                    ^
/Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/irRecv.cpp:105:30: warning: ISO C++ forbids declaration of 'changePin' with no type [-fpermissive]
 IRrecv::changePin(int recvpin){

                              ^
In file included from /Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/ir_NEC.cpp:1:0:
/Volumes/F4MBP/Users/fr4gus/Documents/Arduino/libraries/Robotkit/IRremote.h:176:20: warning: ISO C++ forbids declaration of 'changePin' with no type [-fpermissive]
   changePin(int pin);
                    ^

Hice la prueba agregando del tipo void como retorno del método y no da el warning ni en Windows ni en Mac.

tomasdecamino commented 7 years ago

gracias, voy a revisar con Alex a ver

MrAkaki commented 7 years ago

Excelente! Ya lo corregimos y hemos echo la actualización al repositorio! Muchas gracias!