As other say:
unsigned int a, b, c;
c = (a + b) / 2;
a + b can be not representable in an unsigned int for some value of a and b.
A very similar situation led to a famous bug in the standard Java binary search implementation (binarySearch function).
See this famous Joshua Blosh blog post in 2006:
"Extra, Extra - Read All About It: Nearly All Binary Searches and Mergesorts are Broken"
http://googleresearch.blogspot.com/2006/06/extra-extra-read-all-about-it-nearly.html
Excerpts:
The bug is in this line:
6: int mid =(low + high) / 2;
further down:
So what's the best way to fix the bug? Here's one way:
6: int mid = low + ((high - low) / 2);
Note that in Joshua post, high is >= low and also int objects were used but Java treats signed overflow as wrapping. In C signed integer overflows are undefined behavior and unsigned wraparound.