Remove unused variables.

- Working towards issue #11.

- Either removed or redefined variables to not cause a warning.
Check for malloc failure.
Remove unreferenced_parameter macro.

- It was a silly hack to selectively silence compiler warnings from VS, but
  there is no point as it causes compiler warnings in GCC.
Add extra parenthesis to suppress compiler warnings.