Added compiler warning and set to treat as error. Fixed implementation accordingly.