Eliminate unused function warnings.

This closes #600

Based on a patch to the 0.8 branch from Khouri Giordano <kgiordano@nikon.net>
Signed-off-by: Matthias Kretz <kretz@kde.org>