Cure some bit rot

Newer compilers have stricter warnings, and the test program was not in
sync with the API.

Signed-off-by: Morten Hustveit <mortehu@google.com>