summaryrefslogtreecommitdiffstats
path: root/halimpl
diff options
context:
space:
mode:
authorGeorge Burgess IV <gbiv@google.com>2017-06-25 16:42:51 -0700
committerAndre Eisenbach <eisenbach@google.com>2017-07-07 19:27:28 +0000
commit1e67a856a17ee5200cc2b8a4757e8b474ba89da6 (patch)
treec10f753d91e680a095213be8d5af2ca79d7525b9 /halimpl
parent85be705e843cc99a1903d5519bfed3c8c339404b (diff)
downloadandroid_hardware_broadcom_nfc-1e67a856a17ee5200cc2b8a4757e8b474ba89da6.tar.gz
android_hardware_broadcom_nfc-1e67a856a17ee5200cc2b8a4757e8b474ba89da6.tar.bz2
android_hardware_broadcom_nfc-1e67a856a17ee5200cc2b8a4757e8b474ba89da6.zip
Fix pointer sign conversion warnings in bcm2079x halimpl.
This fixes two warnings like: system/nfc/halimpl/bcm2079x/gki/ulinux/gki_ulinux.c:895:12: warning: returning 'int8_t *' (aka 'signed char *') from a function with result type 'uint8_t *' (aka 'unsigned char *') converts between pointers to integer types with different sign All of the other similar-looking pieces of code return an `int8_t *`, and gki_cb.com.OSTName[N] is an `int8_t *`. Given that it looks like this is only used in one place (a debugging printf), changing the return type doesn't seem problematic. Bug: None Test: mma. No more warning. Change-Id: Icbad3e3a90f68957775de162740a958cc6ccc6d5
Diffstat (limited to 'halimpl')
-rw-r--r--halimpl/bcm2079x/gki/common/gki.h2
-rw-r--r--halimpl/bcm2079x/gki/ulinux/gki_ulinux.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/halimpl/bcm2079x/gki/common/gki.h b/halimpl/bcm2079x/gki/common/gki.h
index a3e478a..f452719 100644
--- a/halimpl/bcm2079x/gki/common/gki.h
+++ b/halimpl/bcm2079x/gki/common/gki.h
@@ -363,7 +363,7 @@ extern uint8_t GKI_create_task(TASKPTR, uint8_t, int8_t*, uint16_t*, uint16_t,
extern void GKI_exit_task(uint8_t);
extern uint8_t GKI_get_taskid(void);
extern void GKI_init(void);
-extern uint8_t* GKI_map_taskname(uint8_t);
+extern int8_t* GKI_map_taskname(uint8_t);
extern uint8_t GKI_resume_task(uint8_t);
extern void GKI_run(void*);
extern void GKI_stop(void);
diff --git a/halimpl/bcm2079x/gki/ulinux/gki_ulinux.c b/halimpl/bcm2079x/gki/ulinux/gki_ulinux.c
index 255d7c2..07767d3 100644
--- a/halimpl/bcm2079x/gki/ulinux/gki_ulinux.c
+++ b/halimpl/bcm2079x/gki/ulinux/gki_ulinux.c
@@ -886,7 +886,7 @@ uint8_t GKI_get_taskid(void) {
** NOTE this function needs no customization
**
*******************************************************************************/
-uint8_t* GKI_map_taskname(uint8_t task_id) {
+int8_t* GKI_map_taskname(uint8_t task_id) {
GKI_TRACE_1("GKI_map_taskname %d", task_id);
if (task_id < GKI_MAX_TASKS) {
@@ -896,7 +896,7 @@ uint8_t* GKI_map_taskname(uint8_t task_id) {
} else if (task_id == GKI_MAX_TASKS) {
return (gki_cb.com.OSTName[GKI_get_taskid()]);
} else {
- return (uint8_t*)"BAD";
+ return (int8_t*)"BAD";
}
}