Updated to suppress some warnings.
The following warning was suppressed:
- Unused parameter in bitalloc_sub_ldac.c
- Implicit conversion of diffrent type of enumeration in ldacBT_api.c
Also enabled "-Werror" in cflags.
Change-Id: I7acec1a7a11ec9ae5ef44acc75dab9f5691f9c04
Signed-off-by: Chisato Kenmochi <[email protected]>
diff --git a/Android.bp b/Android.bp
index e87603c..cf5087e 100644
--- a/Android.bp
+++ b/Android.bp
@@ -12,5 +12,5 @@
],
// -D_32BIT_FIXED_POINT should be added to cflags for devices without a FPU
// unit such as ARM Cortex-R series or external 32-bit DSPs.
- cflags: ["-O2"],
+ cflags: ["-O2", "-Werror"],
}
diff --git a/src/bitalloc_sub_ldac.c b/src/bitalloc_sub_ldac.c
index bd8d717..d77a21b 100644
--- a/src/bitalloc_sub_ldac.c
+++ b/src/bitalloc_sub_ldac.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003 - 2016 Sony Corporation
+ * Copyright (C) 2003 - 2017 Sony Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -20,7 +20,7 @@
Calculate Bits for Band Info
***************************************************************************************************/
static int encode_band_info_ldac(
-AB *p_ab)
+__attribute__((unused)) AB *p_ab)
{
int nbits;
diff --git a/src/ldacBT_api.c b/src/ldacBT_api.c
index af45394..a490a62 100644
--- a/src/ldacBT_api.c
+++ b/src/ldacBT_api.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2013 - 2016 Sony Corporation
+ * Copyright (C) 2013 - 2017 Sony Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,9 +18,9 @@
/* Get LDAC library version */
-#define LDACBT_LIB_VER_MAJOR 1
-#define LDACBT_LIB_VER_MINOR 2
-#define LDACBT_LIB_VER_BRANCH 0
+#define LDACBT_LIB_VER_MAJOR 2
+#define LDACBT_LIB_VER_MINOR 0
+#define LDACBT_LIB_VER_BRANCH 2
LDACBT_API int ldacBT_get_version( void )
{
return ((LDACBT_LIB_VER_MAJOR)<<16)|((LDACBT_LIB_VER_MINOR)<<8)|(LDACBT_LIB_VER_BRANCH);
@@ -547,7 +547,7 @@
}
p_pcm_ring_r = ppcmring->buf + ppcmring->rp;
ldacBT_prepare_pcm_encode( p_pcm_ring_r, hLdacBT->pp_pcm, hLdacBT->frm_samples, ch, fmt );
- result = ldaclib_encode(hLdacBT->hLDAC, hLdacBT->pp_pcm, fmt,
+ result = ldaclib_encode(hLdacBT->hLDAC, hLdacBT->pp_pcm, (LDAC_SMPL_FMT_T)fmt,
p_ldac_transport_frame+LDACBT_FRMHDRBYTES, &frmlen_wrote);
if( !LDAC_FAILED(result) ){
ppcmring->rp += hLdacBT->frm_samples * wl * ch;
@@ -556,7 +556,7 @@
if( ppcmring->nsmpl < 0 ){ ppcmring->nsmpl = 0; }
}
}else{
- result = ldaclib_flush_encode(hLdacBT->hLDAC, fmt,
+ result = ldaclib_flush_encode(hLdacBT->hLDAC, (LDAC_SMPL_FMT_T)fmt,
p_ldac_transport_frame+LDACBT_FRMHDRBYTES, &frmlen_wrote);
hLdacBT->flg_encode_flushed = TRUE;
}