unsigned char str[] = { 0x1, 0x2, 0x3, 0x4, 0x0, 0x0, 0x0, 0x0};
unsigned int *ptr;
- ptr = (unsigned int *)str;
+ ptr = (unsigned int *)(void *)str;
return *ptr == 0x01020304;
}
while (line) {
item = malloc_or_die(sizeof(*item));
sscanf(line, "%d %as", &item->pid,
- (float *)&item->comm); /* workaround gcc warning */
+ (float *)(void *)&item->comm); /* workaround gcc warning */
item->next = list;
list = item;
line = strtok_r(NULL, "\n", &next);
item = malloc_or_die(sizeof(*item));
item->mod = NULL;
ret = sscanf(line, "%as %c %as\t[%as",
- (float *)&addr_str, /* workaround gcc warning */
+ (float *)(void *)&addr_str, /* workaround gcc warning */
&ch,
- (float *)&item->func,
- (float *)&item->mod);
+ (float *)(void *)&item->func,
+ (float *)(void *)&item->mod);
item->addr = strtoull(addr_str, NULL, 16);
free(addr_str);
while (line) {
item = malloc_or_die(sizeof(*item));
ret = sscanf(line, "%as : %as",
- (float *)&addr_str, /* workaround gcc warning */
- (float *)&item->printk);
+ (float *)(void *)&addr_str, /* workaround gcc warning */
+ (float *)(void *)&item->printk);
item->addr = strtoull(addr_str, NULL, 16);
free(addr_str);