Fix build warnings 40/62440/3
authorGilbok Lee <gilbok.lee@samsung.com>
Wed, 16 Mar 2016 06:29:35 +0000 (15:29 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Fri, 18 Mar 2016 08:48:23 +0000 (17:48 +0900)
Change-Id: I86c68f613f1fd5bf5c6df1ba3b6ca70b3c7ab513
Signed-off-by: Gilbok Lee <gilbok.lee@samsung.com>
include/mm_attrs.h
include/mm_attrs_private.h
mm_attrs.c
mm_attrs_private.c
packaging/libmm-common.spec

index 712d73e..30ed643 100644 (file)
@@ -18,7 +18,7 @@
  * limitations under the License.
  *
  */
+
 
 
 #ifndef __MM_ATTRS_H__
@@ -408,7 +408,7 @@ int mm_attrs_set_string(MMHandleType attrs, int id, const char *string, int size
  * @remarks    Application would be responsible for managing/releasing the string
  * @see        mm_attrs_set_string
  */
-int mm_attrs_get_string(MMHandleType attrs, int id,char **sval, int *size);
+int mm_attrs_get_string(MMHandleType attrs, int id, char **sval, int *size);
 
 
 /**
index 141afd2..e9c1093 100644 (file)
@@ -159,7 +159,7 @@ double mmf_value_get_double(mmf_value_t *v);
 
 int mmf_value_set_string(mmf_value_t *v, const char *sval, int size);
 
-const char* mmf_value_get_string(const mmf_value_t *v, int *size);
+char* mmf_value_get_string(const mmf_value_t *v, int *size);
 
 int mmf_value_set_data(mmf_value_t *v, void *data, int size);
 
index 3904c1d..be935a3 100644 (file)
@@ -252,7 +252,7 @@ int mm_attrs_set_string(MMHandleType h, int idx, const char *string, int size)
 }
 
 
-int mm_attrs_get_string(MMHandleType h, int idx,char **sval, int *size)
+int mm_attrs_get_string(MMHandleType h, int idx, char **sval, int *size)
 {
        mmf_attrs_t *attrs = (mmf_attrs_t *) h;
        return_val_if_fail(attrs && idx >= 0 && idx < attrs->count && sval, MM_ERROR_COMMON_INVALID_ARGUMENT);
@@ -428,7 +428,7 @@ int mm_attrs_get_double_by_name(MMHandleType attrs, const char *name, double *va
 int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *attribute_name, va_list var_args)
 {
        const char *name = NULL;
-       int ret = MM_ERROR_NONE;
+       unsigned int ret = MM_ERROR_NONE;
 
        return_val_if_fail(attrs, MM_ERROR_COMMON_INVALID_ARGUMENT);
 //     return_val_if_fail(err_attr_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
@@ -528,7 +528,7 @@ int mm_attrs_set_valist (MMHandleType attrs, char **err_attr_name, const char *a
 int mm_attrs_get_valist (MMHandleType attrs, char **err_attr_name, const char *attribute_name, va_list var_args)
 {
        const char *name = NULL;
-       int ret = MM_ERROR_NONE;
+       unsigned int ret = MM_ERROR_NONE;
 
        return_val_if_fail(attrs, MM_ERROR_COMMON_INVALID_ARGUMENT);
 //     return_val_if_fail(err_attr_name, MM_ERROR_COMMON_INVALID_ARGUMENT);
index b7159af..58020bc 100644 (file)
@@ -19,7 +19,7 @@
  *
  */
 
+
 
 #include <stdio.h>
 #include <string.h>
@@ -115,7 +115,7 @@ int mmf_value_set_string(mmf_value_t *v, const char *sval,int size)
        return 0;
 }
 
-const char* mmf_value_get_string(const mmf_value_t *v, int *size)
+char* mmf_value_get_string(const mmf_value_t *v, int *size)
 {
        return_val_if_fail(v && v->type == MMF_VALUE_TYPE_STRING, NULL);
        *size=v->size;
@@ -338,13 +338,13 @@ bool mmf_attribute_validate_int(mmf_attribute_t *item, int val)
 {
        return_val_if_fail(item, false);
        return_val_if_fail(item->value.type == MMF_VALUE_TYPE_INT, false);
-       
+
        bool valid = true;
        int i = 0;
-       
+
        switch (item->value_spec.type) {
        case MMF_VALUE_SPEC_INT_RANGE:
-               if (val < item->value_spec.spec.int_spec.range.min || 
+               if (val < item->value_spec.spec.int_spec.range.min ||
                                val > item->value_spec.spec.int_spec.range.max) {
                        valid = false;
                        //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name);
@@ -363,9 +363,9 @@ bool mmf_attribute_validate_int(mmf_attribute_t *item, int val)
                }
                break;
        default:
-               break;          
+               break;
        }
-       
+
        return valid;
 }
 
@@ -373,13 +373,13 @@ bool mmf_attribute_validate_double(mmf_attribute_t *item, double val)
 {
        return_val_if_fail(item, false);
        return_val_if_fail(item->value.type == MMF_VALUE_TYPE_DOUBLE, false);
-       
+
        bool valid = true;
        int i = 0;
-       
+
        switch (item->value_spec.type) {
        case MMF_VALUE_SPEC_DOUBLE_RANGE:
-               if (val < item->value_spec.spec.double_spec.range.min || 
+               if (val < item->value_spec.spec.double_spec.range.min ||
                                val > item->value_spec.spec.double_spec.range.max) {
                        valid = false;
                        //mmf_debug(MMF_DEBUG_LOG, "[mmf_attribute:%s] out of range\n", item->name);
@@ -398,9 +398,9 @@ bool mmf_attribute_validate_double(mmf_attribute_t *item, double val)
                }
                break;
        default:
-               break;          
+               break;
        }
-       
+
        return valid;
 }
 
@@ -643,7 +643,7 @@ int mmf_attrs_init(MMHandleType h, mmf_attrs_construct_info_t *info, int count)
 int mmf_attrs_commit(MMHandleType h)
 {
        return_val_if_fail(h, -1);
-       
+
        mmf_attrs_t *attrs = (mmf_attrs_t * )h;
        int i;
        int ret = 0;
index 3055b5a..2fcfa76 100644 (file)
@@ -27,7 +27,7 @@ Multimedia Framework Common Library (devel)
 
 
 %build
-CFLAGS="%{optflags} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" "
+CFLAGS="%{optflags} -DEXPORT_API=\"__attribute__((visibility(\\\"default\\\")))\" -Werror"
 export CFLAGS+=" -Wall -Wcast-align -Wcast-qual -Wextra -Wno-array-bounds -Wno-empty-body -Wno-ignored-qualifiers -Wno-unused-parameter -Wshadow -Wwrite-strings -Wswitch-default -Wno-unused-but-set-parameter -Wno-unused-but-set-variable"
 %reconfigure
 make %{?jobs:-j%jobs}