Lines Matching full:malloc
5 void *malloc(size_t size);
14 int *ip1 = malloc(sizeof(1));
15 int *ip2 = malloc(4 * sizeof(int));
17 long *lp1 = malloc(sizeof(short)); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'long', which is incompatible with sizeof operand type 'short'}}
18 long *lp2 = malloc(5 * sizeof(double)); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'long', which is incompatible with sizeof operand type 'double'}}
19 char *cp3 = malloc(5 * sizeof(char) + 2); // no warning
20 unsigned char *buf = malloc(readSize + sizeof(unsignedInt)); // no warning
33 const char **x = (const char **)malloc(1 * sizeof(char *)); // no-warning
34 const char ***y = (const char ***)malloc(1 * sizeof(char *)); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'const char **', which is incompatible with sizeof operand type 'char *'}}
41 int *table = malloc(sizeof sTable);
42 int *table1 = malloc(sizeof nestedTable);
43 int (*table2)[2] = malloc(sizeof nestedTable);
44 int (*table3)[10][2] = malloc(sizeof nestedTable);
50 int *table = malloc(sizeof sTable); // expected-warning {{Result of 'malloc' is converted to a pointer of type 'int', which is incompatible with sizeof operand type 'const double [10]'}}