LVM2 ./WHATS_NEW daemons/clvmd/clvmd-command.c ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-04-08 14:40:21
Modified files:
. : WHATS_NEW daemons/clvmd : clvmd-command.c clvmd.c refresh_clvmd.c lib/activate : fs.c lib/device : dev-swap.c lib/locking : cluster_locking.c lib/metadata : lv_manip.c metadata.c mirror.c lib/misc : lvm-string.c lib/mm : memlock.c libdm : libdm-file.c libdm-report.c libdm/regex : matcher.c tools : dmsetup.c lvconvert.c lvmcmdline.c
Log message:
Fix some unmatching sign comparation gcc warnings
Simple replacement for unsigned type - usually in for() loops.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1968&r2=1.1969
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd-command.c.diff?cvsroot=lvm2&r1=1.53&r2=1.54
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/clvmd.c.diff?cvsroot=lvm2&r1=1.103&r2=1.104
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/refresh_clvmd.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/activate/fs.c.diff?cvsroot=lvm2&r1=1.61&r2=1.62
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/device/dev-swap.c.diff?cvsroot=lvm2&r1=1.2&r2=1.3
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/locking/cluster_locking.c.diff?cvsroot=lvm2&r1=1.54&r2=1.55
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.256&r2=1.257
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.453&r2=1.454
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/mirror.c.diff?cvsroot=lvm2&r1=1.147&r2=1.148
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/misc/lvm-string.c.diff?cvsroot=lvm2&r1=1.26&r2=1.27
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mm/memlock.c.diff?cvsroot=lvm2&r1=1.39&r2=1.40
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-file.c.diff?cvsroot=lvm2&r1=1.14&r2=1.15
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-report.c.diff?cvsroot=lvm2&r1=1.43&r2=1.44
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/regex/matcher.c.diff?cvsroot=lvm2&r1=1.16&r2=1.17
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/dmsetup.c.diff?cvsroot=lvm2&r1=1.158&r2=1.159
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvconvert.c.diff?cvsroot=lvm2&r1=1.159&r2=1.160
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.137&r2=1.138
WHATS_NEW +1 -0
@@ -1,5 +1,6 @@ Version 2.02.85 - =================================== + Fix some unmatching sign comparation gcc warnings in the code. Allow lv_extend() to work on zero length intrinsically layered LVs. Keep the cache content when the exported vg buffer is matching. Extend the set of memory regions, that are not locked to memory.
daemons/clvmd/clvmd-command.c +1 -1
@@ -377,7 +377,7 @@/* Propogate debug options */ if (clvmd_get_debug ()) {if (!(debug_arg =malloc (16 )) || -dm_snprintf (debug_arg,16 ,"-d%d" , (int )clvmd_get_debug ()) <0 ) +dm_snprintf (debug_arg,16 ,"-d%u" ,clvmd_get_debug ()) <0 ) goto_out; argv[argc++] = debug_arg; debug_arg =NULL ;
daemons/clvmd/clvmd.c +1 -1
@@ -2157,7 +2157,7 @@ {struct local_client *thisfd;for (thisfd = &local_client_head; thisfd !=NULL ; thisfd = thisfd->next) { -if (thisfd->fd ==ntohl (clientid)) +if (thisfd->fd == (int )ntohl (clientid))return thisfd; }return NULL ;
daemons/clvmd/refresh_clvmd.c +1 -1
@@ -80,7 +80,7 @@char outbuf[PIPE_BUF ];struct clvm_header *outheader = (struct clvm_header *) outbuf;int len; -int off; +unsigned off;int buflen;int err;
lib/activate/fs.c +1 -1
@@ -327,7 +327,7 @@/* Check if there is other the type of fs operation stacked */ static int _other_fs_ops (fs_op_t type) { -int i; +unsigned i;for (i =0 ; i <NUM_FS_OPS ; i++)if (type != i && _count_fs_ops[i])
lib/device/dev-swap.c +2 -1
@@ -42,7 +42,8 @@ {char buf[10 ];uint64_t size; -int page, ret =0 ; +unsigned page; +int ret =0 ;if (!dev_get_size (dev, &size)) { stack;
lib/locking/cluster_locking.c +1 -1
@@ -100,7 +100,7 @@ char outbuf[PIPE_BUF] __attribute__((aligned(8)));struct clvm_header *outheader = (struct clvm_header *) outbuf;int len; -int off; +unsigned off;int buflen;int err;
lib/metadata/lv_manip.c +1 -1
@@ -976,7 +976,7 @@ (le - seg->le) / area_multiple, area_len,NULL , max_seg_len,0 , (stripes_per_mimage ==1 ) && only_single_area_segments ?1U :0U , - top_level_area_index !=-1 ? top_level_area_index : (int ) s * stripes_per_mimage, + (top_level_area_index !=-1 ) ? top_level_area_index : (int ) (s * stripes_per_mimage), only_single_area_segments, fn, data))) stack;
lib/metadata/metadata.c +3 -3
@@ -1987,7 +1987,7 @@int (*fn)(struct logical_volume *lv,void *data), void *data) { - int i, s; + unsigned i, s;struct lv_segment *lvseg; struct logical_volume *deps[] = {
@@ -2111,7 +2111,7 @@static int _lv_mark_if_partial_single (struct logical_volume *lv,void *data) { -int s; +unsigned s;struct _lv_mark_if_partial_baton baton;struct lv_segment *lvseg;
@@ -2200,7 +2200,7 @@struct validate_hash *vhash = data;struct lv_segment *lvseg;struct physical_volume *pv; -int s; +unsigned s;int r =1 ; if (lv != dm_hash_lookup_binary(vhash->lvid, &lv->lvid.id[1],
lib/metadata/mirror.c +2 -2
@@ -200,7 +200,7 @@*/ int shift_mirror_images (struct lv_segment *mirrored_seg,unsigned mimage) { -int i; +unsigned i;struct lv_segment_area area;if (mimage >= mirrored_seg->area_count) {
@@ -1836,7 +1836,7 @@int in_sync;struct logical_volume *log_lv;struct lvinfo info; -int old_log_count; +unsigned old_log_count;int r =0 ;if (dm_list_size (&lv->segments) !=1 ) {
lib/misc/lvm-string.c +1 -1
@@ -144,7 +144,7 @@* process several characters in one go. */ static void _unquote_characters (char *src,const char *orig_chars, -const int num_orig_chars, +size_t num_orig_chars,const char quote_char,char *arr_substr_first_unquoted[]) {
lib/mm/memlock.c +2 -1
@@ -151,7 +151,8 @@ {const struct config_value *cv;long from, to; -int pos, i; +int pos; +unsigned i;char fr, fw, fx, fp;size_t sz;
libdm/libdm-file.c +1 -1
@@ -149,7 +149,7 @@ goto fail_close_unlink; } -if ((write_out ==0 ) || (write_out < bufferlen)) { +if ((write_out ==0 ) || ((size_t )write_out < bufferlen)) {log_error ("Cannot write pid to pidfile [%s], shortwrite of" "[%" PRIsize_t"] bytes, expected [%" PRIsize_t"]\n" , lockfile, write_out, bufferlen);
libdm/libdm-report.c +4 -4
@@ -734,8 +734,8 @@return 0 ; } -if ((strlen (field->report_string) > field->props->width)) - field->props->width =strlen (field->report_string); +if (((int )strlen (field->report_string) > field->props->width)) + field->props->width = (int )strlen (field->report_string);if ((rh->flags &RH_SORT_REQUIRED ) && (field->props->flags &FLD_SORT_KEY )) {
@@ -775,8 +775,8 @@ } dm_list_iterate_items(fp, &rh->field_props) { -if (buf_size < fp->width) - buf_size = fp->width; +if ((int ) buf_size < fp->width) + buf_size = (size_t ) fp->width; }/* Including trailing '\0'! */ buf_size++;
libdm/regex/matcher.c +5 -4
@@ -100,7 +100,7 @@static void _create_bitsets (struct dm_regex *m) { -int i; +unsigned i;for (i =0 ; i < m->num_nodes; i++) {struct rx_node *n = m->nodes[i];
@@ -112,7 +112,7 @@static void _calc_functions (struct dm_regex *m) { -int i, j, final =1 ; +unsigned i, j, final =1 ;struct rx_node *rx, *c1, *c2;for (i =0 ; i < m->num_nodes; i++) {
@@ -253,7 +253,8 @@ {unsigned iwidth = (m->num_charsets /DM_BITS_PER_INT ) +1 ;struct dfa_state *dfa; -int i, a; +unsigned i; +int a; m->tt =ttree_create (m->scratch, iwidth);if (!m->tt)
@@ -314,7 +315,7 @@ unsigned num_patterns) {char *all, *ptr; -int i; +unsigned i;size_t len =0 ;struct rx_node *rx;struct dm_regex *m;
tools/dmsetup.c +1 -1
@@ -2412,7 +2412,7 @@ void *private) {const struct dm_deps *deps = data; -int i; +unsigned i;char buf[DM_MAX_TYPE_NAME ], *repstr;if (!dm_pool_begin_object (mem,16 )) {
tools/lvconvert.c +1 -1
@@ -555,7 +555,7 @@ {struct lv_segment *lvseg;int ret =0 ; -int s; +unsigned s; dm_list_iterate_items(lvseg, &lv->segments) {if (!seg_is_mirrored (lvseg))
tools/lvmcmdline.c +1 -1
@@ -1274,7 +1274,7 @@if (getenv ("LVM_SUPPRESS_FD_WARNINGS" )) suppress_warnings =1 ; -for (fd =3 ; fd < rlim.rlim_cur; fd++) +for (fd =3 ; fd < (int )rlim.rlim_cur; fd++)_close_descriptor (fd, suppress_warnings, command, ppid, parent_cmdline); }