From: Neil Brown Date: Wed, 8 Jun 2005 01:18:24 +0000 (+0000) Subject: Fix a few typecasts X-Git-Tag: mdadm-1.12.0~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c50a674f709edb57f7fd17102f7f63475d7b12e9;p=thirdparty%2Fmdadm.git Fix a few typecasts Signed-off-by: Neil Brown --- diff --git a/ChangeLog b/ChangeLog index dfa5f30d..e618e725 100644 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,7 @@ Changes Prior to 1.12.0 release - Allow --auto command line option to set default auto= value when running "--assemble --scan". Previously --auto was ignored if --scan was given + - Fix a few type casts Changes Prior to 1.11.0 release - Fix embarassing bug which causes --add to always fail. diff --git a/util.c b/util.c index d5e2910c..2b7c0d8e 100644 --- a/util.c +++ b/util.c @@ -329,8 +329,8 @@ int check_reiser(int fd, char *name) return 0; if (read(fd, sb, 1024) != 1024) return 0; - if (strncmp(sb+52, "ReIsErFs",8)!=0 && - strncmp(sb+52, "ReIsEr2Fs",9)!=0) + if (strncmp((char*)sb+52, "ReIsErFs",8)!=0 && + strncmp((char*)sb+52, "ReIsEr2Fs",9)!=0) return 0; fprintf(stderr, Name ": %s appears to contain a reiserfs file system\n",name); size = sb[0]|(sb[1]|(sb[2]|sb[3]<<8)<<8)<<8; @@ -512,7 +512,7 @@ unsigned long calc_sb_csum(mdp_super_t *super) unsigned long long newcsum = 0; unsigned long csum; int i; - unsigned int *superc = (int*) super; + unsigned int *superc = (unsigned int*) super; super->sb_csum = 0; for(i=0; i