Blame SOURCES/bz626417_20-cleanup_some_compilation_warning.patch

8ccba5
--- a/lib/events/libdmraid-events-isw.c	
8ccba5
+++ a/lib/events/libdmraid-events-isw.c	
8ccba5
@@ -101,13 +101,12 @@ enum rebuild_type { REBUILD_START, REBUILD_END };
8ccba5
 static const char *default_dmraid_events_lib = "libdmraid-events.so";
8ccba5
 static const char *sys_dm_dm = "dm-";
8ccba5
 static const char *sys_block_path = "/sys/block/";
8ccba5
-static const char *sys_dm_path = "/sys/block/dm-";
8ccba5
+//static const char *sys_dm_path = "/sys/block/dm-";
8ccba5
 static const char *sys_scsi_path = "/sys/class/scsi_device/";
8ccba5
 static const char *sys_slaves_dir = "/slaves";
8ccba5
 static const char *sys_scsi_dev_blk = "/device/block";
8ccba5
 static const char sys_scsi_dev_blk_delims[] = { '/', ':' };
8ccba5
 static const char *sys_dev_dir = "/dev";
8ccba5
-static const char *syslog_ident = "libdmraid-events";
8ccba5
 
8ccba5
 /* Logging. */
8ccba5
 enum log_type { LOG_NAMES, LOG_PORTS, LOG_OPEN_FAILURE, LOG_NONE };
8ccba5
@@ -1534,7 +1533,7 @@ int register_device(const char *rs_name, const char *uuid,
8ccba5
 	/* FIXME: need to run first to get syslog() to work. */
8ccba5
 	_check_sgpio();
8ccba5
 
8ccba5
-	rs_name = basename(rs_name);
8ccba5
+	rs_name = basename((char *)rs_name);
8ccba5
 
8ccba5
 	/* Check for double registration attempt. */
8ccba5
 	pthread_mutex_lock(&_register_mutex);
8ccba5
@@ -1595,7 +1594,7 @@ int unregister_device(const char *rs_name, const char *uuid,
8ccba5
 {
8ccba5
 	struct dso_raid_set *prev, *rs;
8ccba5
 
8ccba5
-	rs_name = basename(rs_name);
8ccba5
+	rs_name = basename((char *)rs_name);
8ccba5
 
8ccba5
 	pthread_mutex_lock(&_register_mutex);
8ccba5
 
8ccba5
--- a/lib/format/ataraid/isw.c	
8ccba5
+++ a/lib/format/ataraid/isw.c	
8ccba5
@@ -1250,7 +1250,7 @@ static int
8ccba5
 isw_metadata_handler(struct lib_context *lc, enum handler_commands command,
8ccba5
 		     struct handler_info *info, void *context)
8ccba5
 {
8ccba5
-	int idx, ret = 0;
8ccba5
+	int ret = 0;
8ccba5
 	struct raid_set *rs = context;
8ccba5
 	struct raid_dev *rd = list_entry(rs->devs.next, struct raid_dev, devs);
8ccba5
 	struct isw *isw, *new_isw;
8ccba5
--- a/lib/register/dmreg.c	
8ccba5
+++ a/lib/register/dmreg.c	
8ccba5
@@ -427,12 +427,12 @@ static int _validate_dev_and_dso_names(char *dev_name, char *dso_name)
8ccba5
  * Function removes unnecassary path to the DSO library
8ccba5
  * (leaves only library name)
8ccba5
  */
8ccba5
-char * dso_lib_name_prepare(char * dso_path) 
8ccba5
+char *dso_lib_name_prepare(char *dso_path) 
8ccba5
 {
8ccba5
 	char *ptr = NULL;
8ccba5
 	char *lib_name = dso_path;
8ccba5
 
8ccba5
-	while (ptr = strchr(lib_name, '/'))
8ccba5
+	while ((ptr = strchr(lib_name, '/')) != NULL)
8ccba5
 	    lib_name = ptr + 1;
8ccba5
 	
8ccba5
 	return lib_name;