diff --git a/jni/ConfFileParser.cpp b/jni/ConfFileParser.cpp
index d270690..0a0883a 100644
--- a/jni/ConfFileParser.cpp
+++ b/jni/ConfFileParser.cpp
@@ -322,7 +322,6 @@
 {
   unsigned int grp_hash_code;
   unsigned int grp_index;
-  unsigned int num_of_keys;
   unsigned int i;
   unsigned int j = 0;
   unsigned int key_len;
@@ -530,8 +529,6 @@
 )
 {
   const char *line_begin;
-  char *grp_name;
-  unsigned int len;
 
   if((line == NULL) || (key_file == NULL)) {
       ALOGE("key file or line is null\n");
@@ -729,53 +726,6 @@
   }
 }
 
-static char key_exist
-(
-  const group_table *key_file,
-  const char *cur_grp,
-  const char *key
-)
-{
-  unsigned int grp_hash_code;
-  unsigned int key_hash_code;
-  unsigned int grp_index;
-  unsigned int key_index;
-  group *grp = NULL;
-  key_value_pair_list *list = NULL;
-
-  if((key_file != NULL) && (cur_grp != NULL)
-      && (key != NULL) && ((key_file->grps_hash != NULL))
-      && (strcmp(key, ""))) {
-     grp_hash_code = get_hash_code(cur_grp);
-     grp_index = (grp_hash_code % key_file->grps_hash_size);
-     grp = key_file->grps_hash[grp_index];
-     key_hash_code = get_hash_code(key);
-     while((grp != NULL)) {
-           if(!strcmp(cur_grp, grp->grp_name)) {
-              key_index = (key_hash_code % grp->keys_hash_size);
-              if(grp->list)
-                 list = grp->list[key_index];
-              while((list != NULL) && strcmp(key, list->key)) {
-                    list = list->next;
-              }
-              if(list != NULL){
-                  return TRUE;
-              }else{
-                  return FALSE;
-              }
-           }
-           grp = grp->grp_next;
-     }
-     if(!grp) {
-        return TRUE;
-     }else {
-        return FALSE;
-     }
-  }else {
-     return FALSE;
-  }
-}
-
 //checks validity of key
 //a valid key must start in
 //a seperate line and key must
diff --git a/jni/ConfigFmThs.cpp b/jni/ConfigFmThs.cpp
index 3845dfd..10bb921 100644
--- a/jni/ConfigFmThs.cpp
+++ b/jni/ConfigFmThs.cpp
@@ -344,7 +344,6 @@
     UINT fd
 )
 {
-    signed char ret = FM_SUCCESS;
     char **keys = NULL;
     char **keys_cpy = NULL;
     char *key_value = NULL;
@@ -352,7 +351,6 @@
     unsigned int *freqs_array = NULL;
     signed char *sinrs_array = NULL;
     char *sinrs = NULL;
-    int value;
     unsigned int freq_cnt = 0;
     unsigned int sinr_cnt = 0;
     FmPerformanceParams perf_params;
@@ -485,7 +483,6 @@
     const char *file, UINT fd
 )
 {
-    int index;
     struct NAME_MAP *found;
     char **grps = NULL;
     char **grps_cpy = NULL;
diff --git a/jni/FmPerformanceParams.cpp b/jni/FmPerformanceParams.cpp
index bdd0a43..9d1542f 100644
--- a/jni/FmPerformanceParams.cpp
+++ b/jni/FmPerformanceParams.cpp
@@ -377,7 +377,6 @@
    struct v4l2_ext_control ext_ctl;
    struct v4l2_ext_controls v4l2_ctls;
    unsigned int freq;
-   signed char sinr;
    unsigned int size = 0;
    char *data = NULL;
    signed char ret = FM_FAILURE;
diff --git a/jni/android_hardware_fm.cpp b/jni/android_hardware_fm.cpp
index 22f9c3e..08793f9 100644
--- a/jni/android_hardware_fm.cpp
+++ b/jni/android_hardware_fm.cpp
@@ -254,7 +254,6 @@
     }
 
     mCallbackEnv->SetByteArrayRegion(rt_buff, 0, len,(jbyte *)rt);
-    jbyte* bytes= mCallbackEnv->GetByteArrayElements(rt_buff,0);
 
     mCallbackEnv->CallVoidMethod(mCallbacksObj, method_rtCallback,rt_buff);
     mCallbackEnv->DeleteLocalRef(rt_buff);
@@ -279,7 +278,6 @@
     }
 
     mCallbackEnv->SetByteArrayRegion(ps_data, 0, len,(jbyte *)ps);
-    jbyte* bytes= mCallbackEnv->GetByteArrayElements(ps_data,0);
     mCallbackEnv->CallVoidMethod(mCallbacksObj, method_psInfoCallback,ps_data);
     mCallbackEnv->DeleteLocalRef(ps_data);
 }
@@ -575,7 +573,7 @@
         (JNIEnv* env, jobject thiz, jstring path)
 {
     int fd;
-    int i,err;
+    int i = 0, err;
     char value[PROPERTY_VALUE_MAX] = {'\0'};
     char versionStr[40] = {'\0'};
     int init_success = 0;
