fix static analysis warnings about not checking return of sscanf in history.cpp #3590