changeset 83:d890b3e2738e

8069158: Need to fix build warnings Summary: Corrected function signatures and variable types Reviewed-by: alkonsta
author snazarki
date Fri, 16 Jan 2015 15:01:19 +0400
parents 7016cd2773b3
children c35a455d914d
files src/share/linux/native/com/oracle/dio/spibus/spi.c src/share/linux/native/com/oracle/dio/uart/serial.c src/share/native/com/oracle/dio/javacall_serial.h
diffstat 3 files changed, 7 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/linux/native/com/oracle/dio/spibus/spi.c	Thu Jan 15 19:28:50 2015 +0400
+++ b/src/share/linux/native/com/oracle/dio/spibus/spi.c	Fri Jan 16 15:01:19 2015 +0400
@@ -58,8 +58,9 @@
     char* rxBuf;
 };
 
+typedef struct _spi_slave_config spi_slave_config;
 
-typedef struct {
+struct _spi_slave_config {
     int                busId;        /* bus ID */
     int                address;      /* chip enable:                */
                                      /*    =  0 - NO_CS             */
@@ -79,9 +80,9 @@
     int                devFd;
     javacall_spi_cs_active csActive;
     javacall_bool          busOwner;
-    struct spi_slave_config* next;
+    struct _spi_slave_config* next;
     spi_context* xfer_list;
-} spi_slave_config;
+};
 
 #define SSC(arg) ((spi_slave_config*)arg)
 
--- a/src/share/linux/native/com/oracle/dio/uart/serial.c	Thu Jan 15 19:28:50 2015 +0400
+++ b/src/share/linux/native/com/oracle/dio/uart/serial.c	Fri Jan 16 15:01:19 2015 +0400
@@ -90,7 +90,7 @@
             if (!(de->d_type & DT_DIR)) {
                 const char* curPrefix = prefix;
                 // retuns curPrefix if no more templates found
-                char* nextPrefix = getNextDelimiterPtr(curPrefix);
+                const char* nextPrefix = getNextDelimiterPtr(curPrefix);
 
                 while (nextPrefix  != curPrefix) {
                     // compare file name with prefix: wildcard search
@@ -542,7 +542,7 @@
 /**
  * See javacall_serial.h for definition
  */
-javacall_result /*OPTIONAL*/ javacall_serial_available(javacall_handle handle, int *pBytesAvailable){
+javacall_result /*OPTIONAL*/ javacall_serial_available(javacall_handle handle,  javacall_int32 *pBytesAvailable){
     serial_handle p = ((serial_handle)handle);
     javacall_result result;
 
--- a/src/share/native/com/oracle/dio/javacall_serial.h	Thu Jan 15 19:28:50 2015 +0400
+++ b/src/share/native/com/oracle/dio/javacall_serial.h	Fri Jan 16 15:01:19 2015 +0400
@@ -334,7 +334,7 @@
  * @retval JAVACALL_OK      success
  * @retval JAVACALL_FAIL    if there was an error
  */
-javacall_result /*OPTIONAL*/ javacall_serial_available(javacall_handle handle, int *pBytesAvailable);
+javacall_result /*OPTIONAL*/ javacall_serial_available(javacall_handle handle, javacall_int32 *pBytesAvailable);
 
 /**
  * Returns signal line mode