Lines Matching refs:warn
62 f(p); // warn
78 int x = p[0]; // warn
84 *p = 0; // warn
95 int k = pc->x; // warn
107 obj->x = 1; // warn
122 p = str; // warn
126 return __builtin_alloca(12); // warn
132 x = &y; // warn
146 int y = x + 1; // warn: left operand is garbage
161 int vla1[x]; // warn: garbage as size
166 int vla2[x]; // warn: zero size
179 int x = a[i]; // warn: array subscript is undefined
192 x |= 1; // warn: left expression is uninitialized
205 if (x) // warn
219 ^{ int y = x; }(); // warn
232 return x; // warn
265 consume(c); // warn: inner pointer of container used after re/deallocation
269 return std::to_string(x).c_str(); // warn: inner pointer of container used after re/deallocation
293 } // warn
307 long *lp = ::new (&s) long; // warn
333 x = 1; // warn
341 Would warn for this e.g.:
350 Objective C checkers that warn for null pointer passing and dereferencing errors.
418 takesNonnull(p); // warn
551 f(); // warn
559 this->f(); // warn
577 } // warn: request 'sendReq1' has no matching wait.
583 MPI_Irecv(&buf, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD, &sendReq); // warn
584 MPI_Isend(&buf, 1, MPI_DOUBLE, 0, 0, MPI_COMM_WORLD, &sendReq); // warn
592 MPI_Wait(&sendReq1[1][7][9], MPI_STATUS_IGNORE); // warn
604 NSString *string = NSLocalizedString(@"LocalizedString", nil); // warn
605 NSString *string2 = NSLocalizedString(@"LocalizedString", @" "); // warn
607 @"LocalizedString", nil, [[NSBundle alloc] init], nil,@""); // warn
663 for (float x = 0.1f; x <= 1.0f; x += 0.1f) {} // warn
675 setuid(1); // warn
687 bcmp(ptr0, ptr1, n); // warn
699 bcopy(src, dst, n); // warn
711 bzero(ptr, n); // warn
724 getpw(2, buff); // warn
737 gets(buff); // warn
749 mkstemp("XX"); // warn
761 char *x = mktemp("/tmp/zxcv"); // warn: insecure, use mkstemp
774 random(); // warn
789 strcpy(x, y); // warn
802 vfork(); // warn
815 strncpy(buf, "a", 1); // warn
852 // warn: result is converted to 'long *', which is
875 pid_t pid = vfork(); // warn
886 x = 0; // warn: this assignment is prohibited
889 foo(); // warn: this function call is prohibited
892 return 0; // warn: return is prohibited
909 // warn: potential buffer overflow
922 return strlen(0); // warn
941 dispatch_once(&pred, ^(){}); // warn: dispatch_once uses local
994 @synchronized(x) {} // warn: nil value used as mutex
999 @synchronized(y) {} // warn: uninitialized value used as mutex
1020 [MyClass release]; // warn
1053 - (float)foo { return 1.0; } // warn
1073 - (void)viewDidLoad {} // warn
1087 [pool release]; // warn
1104 // warn: method accepting NSError"""""""""""""""""""""""" should have a non-void
1115 *error = 0; // warn: potential null dereference
1139 // warn: argument to 'NSString' method
1174 NSString *s = [[NSString alloc] init]; // warn
1179 0, bytes, NSNEXTSTEPStringEncoding, 0); // warn
1206 x = 0; // warn: instance variable used while 'self' is not
1219 return self; // warn: returning uninitialized 'self'
1239 [_ivar release]; // warn
1253 id x; // warn
1271 // warn: argument should be an ObjC pointer type, not 'char *'
1283 // warn: function accepting CFErrorRef* should have a
1288 *error = 0; // warn: potential null dereference
1302 // warn: 8 bit integer is used to initialize a 16 bit integer
1315 CFRetain(p); // warn
1322 CFRelease(p); // warn
1335 CFArrayGetValueAtIndex(A, 0); // warn
1349 &kCFTypeArrayCallBacks); // warn
1405 struct Derived : RefCntblBase { }; // warn
1421 RefCntbl * ptr; // warn
1422 RefCntbl & ptr; // warn
1440 [&, a](){ // warn about 'a'
1441 do_something(b); // warn about 'b'
1465 int max(int a, int b) { // warn
1488 BOOL b = -1; // warn
1508 mtx_lock(&mtx1); // warn: This lock has already been acquired
1525 foo(q); // warn
1530 foo(&x); // warn
1542 int *x = (int *) malloc(11); // warn
1557 struct s *ps = (struct s *) p; // warn
1564 c *pc = (c *) p; // warn
1581 if (U < S) { // warn (loss of sign)
1588 short X = A; // warn (loss of precision)
1617 p = (int *) 0x10000; // warn
1631 int b = a | 4 | a; // warn: identical expr on both sides
1639 if (f()) { // warn: true and false branches are identical
1661 p = &x + 1; // warn
1674 int d = &y - &x; // warn
1689 // warn: sizeof(ptr) can produce an unexpected result
1712 return outer; // warn: address of stack-allocated block is captured by a
1727 if (x == 0) { } // warn
1748 delete x; // warn: destruction of a polymorphic object with no virtual
1766 // warn: the value provided to the cast expression is not in
1781 *i0; // warn: invalidated iterator accessed
1795 *i; // warn: iterator accessed outside of its range
1807 v2.insert(v1.cbegin(), v2.cbegin(), v2.cend()); // warn: container accessed
1810 v1.insert(v1.cbegin(), v1.cbegin(), v2.cend()); // warn: iterators of
1815 v1.insert(v1.cbegin(), v2.cbegin(), v1.cend()); // warn: iterators of
1838 a.foo(); // warn: method call on a 'moved-from' object 'a'
1855 return x; // warn
1866 a++; // warn
1872 [x retain]; // warn
1885 *P; // warn: dereference of a default constructed smart unique_ptr
1905 spin_lock(&mtx1); // warn: This lock has already been acquired
1941 _A = 0; // warn
1963 _A = 0; // warn
1966 _A = 0; // no warn
1997 // warn: var needs to be invalidated or set to nil
2016 NeedInvalidation *Var; // warn
2091 char c = s[1]; // warn
2103 p[2] = a; // warn
2110 p[3] = 4; // warn
2116 b[1] = 3; // warn
2129 char c = s[1]; // warn
2136 p[1] = 1; // warn
2143 buf[0][-1] = 1; // warn
2150 char c = s[x]; // warn: index is tainted
2162 void *p = malloc(n * sizeof(int)); // warn
2182 // warn: Both PROT_WRITE and PROT_EXEC flags are set. This can lead to
2199 return p; // warn
2204 return x; // warn: undefined or garbage returned
2218 system(&x); // warn: untrusted data is passed to a system call
2228 sprintf(buf, s); // warn: untrusted data as a format string
2235 // warn: untrusted data as buffer size
2254 sleep(3); // warn: a blocking function sleep is called inside a critical
2271 f(); // warn: no call of chdir("/") immediately after chroot
2291 // warn: this lock has already been acquired
2300 // warn: this was not the most recently acquired lock
2311 // warn: this was not the most recently acquired lock
2327 } // warn: opened file is never closed
2335 fclose(F); // warn: closing a previously closed file stream
2349 } // warn: opened file is never closed
2353 fseek(p, 1, SEEK_SET); // warn: stream pointer might be NULL
2362 // warn: third arg should be SEEK_SET, SEEK_END, or SEEK_CUR
2370 fclose(p); // warn: already closed
2375 ftell(p); // warn: stream pointer might be NULL
2390 memcpy(a + 2, a + 1, 8); // warn
2402 int y = strlen((char *)&test); // warn
2415 int y = strlen((char *)&test); // warn
2430 for (auto i : UnorderedPtrSet) // warn
2445 std::sort(V.begin(), V.end()); // warn
2458 Here are some examples of situations that we warn about as they *might* be potentially unsafe. The …
2468 consume(provide_uncounted()); // warn
2473 consume(uncounted); // warn
2486 consume(member.get()); // warn
2565 Here are some examples of situations that we warn about as they *might* be potentially unsafe. The …
2570 RefCountable* uncounted = new RefCountable; // warn
2575 RefCountable* uncounted = global_uncounted; // warn
2581 RefCountable* uncounted = counted.get(); // warn
2584 We don't warn about these cases - we don't consider them necessarily safe but since they are very c…
2588 For the time being we also don't warn about uninitialized uncounted local variables.