Remove some useless declarations found by scan-build, the LLVM/clang static analyzer

Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
Fix segfault in firefox when scrolling on certain pages

Bug discovered by thorsten <fly_a320@gmx.de>

Patch from Chris Wilson <chris@chris-wilson.co.uk>
boilerplate: Maintain consistency in the usage of switch cases

Some of the switch cases used in boilerplate are not consistent
across other source files in the same module. This patch fixes the
consistency issues of switch case usage in the boilerplate module.

Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
Reviewed-by: Uli Schlachter <psychon@znc.in>
Pattern document clarification

Replaces documentation of the form "range 0 to 1 less than the number"
with "ranges from 0 to n-1 where n is the number", which is idiomatic
mathematical writing and less ambiguous.

Signed-off-by: jimmyfrasche <soapboxcicero@gmail.com>
Reviewed-by: Bryce Harrington <b.harrington@samsung.com>