Ticket #3466: mc-3466-cleanup-pointer_arith-warning.patch
File mc-3466-cleanup-pointer_arith-warning.patch, 2.8 KB (added by and, 9 years ago) |
---|
-
m4.include/mc-cflags.m4
fix -Wpointer-arith compiler warnings and add to mc cflags panel.c:1538:51: error: pointer of type 'void *' used in arithmetic [-Wpointer-arith] growbuf.c:159:65: error: pointer of type 'void *' used in arithmetic [-Wpointer-arith] growbuf.c:296:77: error: pointer of type 'void *' used in arithmetic [-Wpointer-arith] growbuf.c:299:77: error: pointer of type 'void *' used in arithmetic [-Wpointer-arith] config_parser.c:167:31: error: arithmetic on a pointer to void is a GNU libtool Signed-off-by: Andreas Mohr <and@gmx.li>
a b 70 70 MC_CHECK_ONE_CFLAG([-Wno-long-long]) 71 71 MC_CHECK_ONE_CFLAG([-Wno-unreachable-code]) 72 72 MC_CHECK_ONE_CFLAG([-Wparentheses]) 73 MC_CHECK_ONE_CFLAG([-Wpointer-arith]) 73 74 MC_CHECK_ONE_CFLAG([-Wpointer-sign]) 74 75 MC_CHECK_ONE_CFLAG([-Wredundant-decls]) 75 76 MC_CHECK_ONE_CFLAG([-Wreturn-type]) -
src/filemanager/panel.c
a b 1535 1535 1536 1536 hkey = strchr (translated_title, '&'); 1537 1537 if (hkey != NULL && hkey[1] != '\0') 1538 memmove ( (void *) hkey, (void *)hkey + 1, strlen (hkey));1538 memmove (hkey, hkey + 1, strlen (hkey)); 1539 1539 } 1540 1540 1541 1541 return translated_title; -
src/viewer/growbuf.c
a b 155 155 g_ptr_array_add (view->growbuf_blockptr, newblock); 156 156 view->growbuf_lastindex = 0; 157 157 } 158 p = g_ptr_array_index (view->growbuf_blockptr,158 p = (byte *) g_ptr_array_index (view->growbuf_blockptr, 159 159 view->growbuf_blockptr->len - 1) + view->growbuf_lastindex; 160 160 161 161 bytesfree = VIEW_PAGE_SIZE - view->growbuf_lastindex; … … 293 293 if (view->growbuf_blockptr->len == 0) 294 294 return NULL; 295 295 if (pageno < (off_t) view->growbuf_blockptr->len - 1) 296 return (char *) ( g_ptr_array_index (view->growbuf_blockptr, pageno) + pageindex);296 return (char *) ((char *)g_ptr_array_index (view->growbuf_blockptr, pageno) + pageindex); 297 297 if (pageno == (off_t) view->growbuf_blockptr->len - 1 298 298 && pageindex < (off_t) view->growbuf_lastindex) 299 return (char *) ( g_ptr_array_index (view->growbuf_blockptr, pageno) + pageindex);299 return (char *) ((char *)g_ptr_array_index (view->growbuf_blockptr, pageno) + pageindex); 300 300 return NULL; 301 301 } 302 302 -
src/vfs/sftpfs/config_parser.c
a b 132 132 /* --------------------------------------------------------------------------------------------- */ 133 133 134 134 #define POINTER_TO_STRUCTURE_MEMBER(type) \ 135 ((type) ( (void *)config_entity + (off_t) config_variables[i].offset))135 ((type) (config_entity + (off_t) config_variables[i].offset)) 136 136 137 137 /** 138 138 * Parse string and filling one config entity by parsed data.