Lines Matching full:void
9 typedef const void * (*CFArrayRetainCallBack)(CFAllocatorRef allocator, const void *value);
10 typedef void (*CFArrayReleaseCallBack)(CFAllocatorRef allocator, const void *value);
11 typedef CFStringRef (*CFArrayCopyDescriptionCallBack)(const void *value);
12 typedef Boolean (*CFArrayEqualCallBack)(const void *value1, const void *value2);
21 CFArrayRef CFArrayCreate(CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFArrayCallBacks *callBacks);
46 typedef const void * (*CFDictionaryRetainCallBack)(CFAllocatorRef allocator, const void *value);
47 typedef void (*CFDictionaryReleaseCallBack)(CFAllocatorRef allocator, const void *value);
48 typedef CFStringRef (*CFDictionaryCopyDescriptionCallBack)(const void *value);
49 typedef Boolean (*CFDictionaryEqualCallBack)(const void *value1, const void *value2);
50 typedef Boolean (*CFArrayEqualCallBack)(const void *value1, const void *value2);
51 typedef Boolean (*CFSetEqualCallBack)(const void *value1, const void *value2);
52 typedef const void * (*CFSetRetainCallBack)(CFAllocatorRef allocator, const void *value);
53 typedef void (*CFSetReleaseCallBack)(CFAllocatorRef allocator, const void *value);
54 typedef CFStringRef (*CFSetCopyDescriptionCallBack)(const void *value);
76 CFDictionaryRef CFDictionaryCreate(CFAllocatorRef allocator, const void **keys, const void **values, CFIndex numValues, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks);
85 const void *CFArrayGetValueAtIndex(CFArrayRef theArray, CFIndex idx);
88 CFDictionaryRef CFDictionaryCreate(CFAllocatorRef allocator, const void **keys, const void **values, CFIndex numValues, const
90 CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, const void *valuePtr);
92 CFSetRef CFSetCreate(CFAllocatorRef allocator, const void **values, CFIndex numValues, const CFSetCallBacks *callBacks);
98 void testContainers(int **xNoWarn, CFIndex count) {
100 CFArrayRef foo = CFArrayCreate(kCFAllocatorDefault, (const void **) x, sizeof(x) / sizeof(x[0]), 0);// expected-warning {{The first argument to 'CFArrayCreate' must be a C array of pointer-sized}}
102 CFArrayRef fooNoWarn = CFArrayCreate(kCFAllocatorDefault, (const void **) xNoWarn, sizeof(xNoWarn) / sizeof(xNoWarn[0]), 0); // no warning
106 CFSetRef set = CFSetCreate(NULL, (const void **)x, 3, &kCFTypeSetCallBacks); // expected-warning {{The first argument to 'CFSetCreate' must be a C array of pointer-sized values}}
108 CFSetRef fSet = CFSetCreate(kCFAllocatorDefault, (const void**) pairs, count - 1, &kCFTypeSetCallBacks);// no warning
111 void CreateDict(int *elems) {
127 CFDictionaryRef dict1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**)keys, (const void**)values, numValues, &keyCB, &valCB); // no warning
128 CFDictionaryRef dict2 = CFDictionaryCreate(kCFAllocatorDefault, (const void**)elems[0], (const void**)values, numValues, &keyCB, &valCB); //expected-warning {{The first argument to 'CFDictionaryCreate' must be a C array of}}
129 CFDictionaryRef dict3 = CFDictionaryCreate(kCFAllocatorDefault, (const void**)keys, (const void**)elems, numValues, &keyCB, &valCB); // expected-warning {{The second argument to 'CFDictionaryCreate' must be a C array of pointer-sized values}}
132 void OutOfBoundsSymbolicOffByOne(const void ** input, CFIndex S) {
135 const void *s1 = CFArrayGetValueAtIndex(array, 0); // no warning
136 const void *s2 = CFArrayGetValueAtIndex(array, S-1); // no warning
137 const void *s3 = CFArrayGetValueAtIndex(array, S); // expected-warning {{Index is out of bounds}}
140 void OutOfBoundsConst(const void ** input, CFIndex S) {
143 const void *s1 = CFArrayGetValueAtIndex(array, 0); // no warning
144 const void *s2 = CFArrayGetValueAtIndex(array, 2); // no warning
145 const void *s3 = CFArrayGetValueAtIndex(array, 5); // expected-warning {{Index is out of bounds}}
150 const void *s = CFArrayGetValueAtIndex(array, sIndex);
154 void OutOfBoundsZiro(const void ** input, CFIndex S) {
158 const void *s1 = CFArrayGetValueAtIndex(array, 0); // expected-warning {{Index is out of bounds}}
161 void TestGetCount(CFArrayRef A, CFIndex sIndex) {
164 const void *s1 = CFArrayGetValueAtIndex(A, sIndex);
165 const void *s2 = CFArrayGetValueAtIndex(A, sCount);// expected-warning {{Index is out of bounds}}
168 typedef void* XX[3];
169 void TestPointerToArray(int *elems, void *p1, void *p2, void *p3, unsigned count, void* fn[], char cp[]) {
170 void* x[] = { p1, p2, p3 };
171 CFArrayCreate(0, (const void **) &x, count, 0); // no warning
173 void* y[] = { p1, p2, p3 };
174 CFArrayCreate(0, (const void **) y, count, 0); // no warning
176 CFArrayCreate(0, (const void **) z, count, 0); // no warning
178 CFArrayCreate(0, (const void **) &fn, count, 0); // false negative
179 CFArrayCreate(0, (const void **) fn, count, 0); // no warning
180 CFArrayCreate(0, (const void **) cp, count, 0); // expected-warning {{The first argument to 'CFArrayCreate' must be a C array of pointer-sized}}
183 CFArrayCreate(0, (const void **) &cc, count, 0); // expected-warning {{The first argument to 'CFArrayCreate' must be a C array of pointer-sized}}
184 CFArrayCreate(0, (const void **) cc, count, 0); // expected-warning {{The first argument to 'CFArrayCreate' must be a C array of pointer-sized}}
187 void TestUndef(CFArrayRef A, CFIndex sIndex, void* x[]) {
189 const void *s1 = CFArrayGetValueAtIndex(A, undefVal);
192 CFArrayRef B = CFArrayCreate(0, (const void **) &x, undefVal2, 0);
193 const void *s2 = CFArrayGetValueAtIndex(B, 2);
196 void TestConst(CFArrayRef A, CFIndex sIndex, void* x[]) {
197 CFArrayRef B = CFArrayCreate(0, (const void **) &x, 4, 0);
198 const void *s1 = CFArrayGetValueAtIndex(B, 2);
202 void TestNullArray() {