comparison mac/dw.m @ 1110:404b639f096b

Minor typecast fixes for warnings reported by clang on Mac.
author bsmith@81767d24-ef19-dc11-ae90-00e081727c95
date Wed, 27 Jul 2011 00:37:34 +0000
parents cfe7d2b6bc16
children 03cd2f3e929d
comparison
equal deleted inserted replaced
1109:1c24949cf853 1110:404b639f096b
8252 } 8252 }
8253 } 8253 }
8254 8254
8255 void _my_strlwr(char *buf) 8255 void _my_strlwr(char *buf)
8256 { 8256 {
8257 int z, len = strlen(buf); 8257 int z, len = (int)strlen(buf);
8258 8258
8259 for(z=0;z<len;z++) 8259 for(z=0;z<len;z++)
8260 { 8260 {
8261 if(buf[z] >= 'A' && buf[z] <= 'Z') 8261 if(buf[z] >= 'A' && buf[z] <= 'Z')
8262 buf[z] -= 'A' - 'a'; 8262 buf[z] -= 'A' - 'a';
8277 8277
8278 8278
8279 if(!handle) 8279 if(!handle)
8280 return -1; 8280 return -1;
8281 8281
8282 if((len = strlen(name)) == 0) 8282 if((len = (int)strlen(name)) == 0)
8283 return -1; 8283 return -1;
8284 8284
8285 /* Lenth + "lib" + ".dylib" + NULL */ 8285 /* Lenth + "lib" + ".dylib" + NULL */
8286 newname = malloc(len + 10); 8286 newname = malloc(len + 10);
8287 8287
8585 /* Handle any events posted to the semaphore */ 8585 /* Handle any events posted to the semaphore */
8586 for(z=0;z<connectcount;z++) 8586 for(z=0;z<connectcount;z++)
8587 { 8587 {
8588 if(FD_ISSET(array[z].fd, &rd)) 8588 if(FD_ISSET(array[z].fd, &rd))
8589 { 8589 {
8590 if((bytesread = read(array[z].fd, &command, 1)) < 1) 8590 if((bytesread = (int)read(array[z].fd, &command, 1)) < 1)
8591 { 8591 {
8592 struct _seminfo *newarray; 8592 struct _seminfo *newarray;
8593 8593
8594 /* Remove this connection from the set */ 8594 /* Remove this connection from the set */
8595 newarray = (struct _seminfo *)malloc(sizeof(struct _seminfo)*(connectcount-1)); 8595 newarray = (struct _seminfo *)malloc(sizeof(struct _seminfo)*(connectcount-1));
8818 if(timeout == -1) 8818 if(timeout == -1)
8819 useme = NULL; 8819 useme = NULL;
8820 else 8820 else
8821 { 8821 {
8822 tv.tv_sec = timeout / 1000; 8822 tv.tv_sec = timeout / 1000;
8823 tv.tv_usec = timeout % 1000; 8823 tv.tv_usec = (int)timeout % 1000;
8824 8824
8825 useme = &tv; 8825 useme = &tv;
8826 } 8826 }
8827 8827
8828 FD_ZERO(&rd); 8828 FD_ZERO(&rd);