Mercurial > dwindows
changeset 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 | 1c24949cf853 |
children | 6782c2c722f4 |
files | compat.c dwtest.c mac/dw.m |
diffstat | 3 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/compat.c Tue Jul 26 20:35:05 2011 +0000 +++ b/compat.c Wed Jul 27 00:37:34 2011 +0000 @@ -41,7 +41,7 @@ nanosleep(&req, NULL); #else - usleep(period * 1000); + usleep((int)(period * 1000)); #if defined(__MAC__) && !defined(GARBAGE_COLLECT) _dw_pool_drain(); #endif @@ -632,7 +632,7 @@ if(argc > 0) { char *tmpdir = strdup(argv[0]); - int z, len = strlen(argv[0]); + int z, len = (int)strlen(argv[0]); for(z=len;z > -1;z--) { @@ -691,7 +691,7 @@ int _stripcrlf(char *buf) { - int z, len = strlen(buf); + int z, len = (int)strlen(buf); for(z=0;z<len;z++) { @@ -773,7 +773,7 @@ /* Use defaults on blank lines */ if(text[0]) { - int x = 0, z, len = strlen(text); + int x = 0, z, len = (int)strlen(text); locale_text[current] = calloc(1, len + 1);
--- a/dwtest.c Tue Jul 26 20:35:05 2011 +0000 +++ b/dwtest.c Wed Jul 27 00:37:34 2011 +0000 @@ -351,7 +351,7 @@ dw_draw_text(window, pixmap, 10, 10, "This should be aligned with the edges."); if(image) { - dw_pixmap_bitblt(window, pixmap, image_x, image_y, DW_PIXMAP_WIDTH(image), DW_PIXMAP_HEIGHT(image), 0, image, 0, 0); + dw_pixmap_bitblt(window, pixmap, image_x, image_y, (int)DW_PIXMAP_WIDTH(image), (int)DW_PIXMAP_HEIGHT(image), 0, image, 0, 0); } /* If we aren't drawing direct do a bitblt */
--- a/mac/dw.m Tue Jul 26 20:35:05 2011 +0000 +++ b/mac/dw.m Wed Jul 27 00:37:34 2011 +0000 @@ -8254,7 +8254,7 @@ void _my_strlwr(char *buf) { - int z, len = strlen(buf); + int z, len = (int)strlen(buf); for(z=0;z<len;z++) { @@ -8279,7 +8279,7 @@ if(!handle) return -1; - if((len = strlen(name)) == 0) + if((len = (int)strlen(name)) == 0) return -1; /* Lenth + "lib" + ".dylib" + NULL */ @@ -8587,7 +8587,7 @@ { if(FD_ISSET(array[z].fd, &rd)) { - if((bytesread = read(array[z].fd, &command, 1)) < 1) + if((bytesread = (int)read(array[z].fd, &command, 1)) < 1) { struct _seminfo *newarray; @@ -8820,7 +8820,7 @@ else { tv.tv_sec = timeout / 1000; - tv.tv_usec = timeout % 1000; + tv.tv_usec = (int)timeout % 1000; useme = &tv; }