Fix Android compilation warnings

This commit is contained in:
hedgecrw85 2018-01-10 11:46:15 -06:00
parent be4eb53a26
commit fa67ffb462
3 changed files with 6 additions and 2 deletions

View File

@ -34,6 +34,7 @@
#include <asm/ioctls.h> #include <asm/ioctls.h>
#include <linux/usbdevice_fs.h> #include <linux/usbdevice_fs.h>
#include <asm/byteorder.h> #include <asm/byteorder.h>
#include <unistd.h>
#ifndef BOTHER #ifndef BOTHER
#include <termios.h> #include <termios.h>
#endif #endif
@ -66,7 +67,7 @@ void getFriendlyName(const char* productFile, char* friendlyName)
if (input) if (input)
{ {
char ch = getc(input); char ch = getc(input);
while ((ch != '\n') && (ch != EOF)) while ((ch != '\n') && ((int)ch != EOF))
{ {
friendlyName[friendlyNameLength++] = ch; friendlyName[friendlyNameLength++] = ch;
ch = getc(input); ch = getc(input);

View File

@ -39,4 +39,6 @@ void getFriendlyName(const char* productFile, char* friendlyName);
unsigned int getBaudRateCode(int baudRate); unsigned int getBaudRateCode(int baudRate);
void setBaudRate(int portFD, int baudRate); void setBaudRate(int portFD, int baudRate);
extern int ioctl(int __fd, int __request, ...);
#endif // #ifndef __ANDROID_HELPER_FUNCTIONS_HEADER_H__ #endif // #ifndef __ANDROID_HELPER_FUNCTIONS_HEADER_H__

View File

@ -1 +1,2 @@
APP_ABI := all APP_ABI := all
APP_PLATFORM := android-14