lint: take care of various warnings/errors issued by cppcheck (WIP)

- [ ] 4860  style (unusedStructMember)
- [ ]    68  error (nullPointer)
- [ ]    15  style (unreadVariable)
- [ ]    12  performance (redundantAssignment)
- [ ]      8  style (unusedVariable)
- [ ]      8  performance (passedByValue)
- [x]      7  style (unassignedVariable)
- [ ]      3  warning (nullPointer)
- [ ]      1  warning (uselessAssignmentPtrArg)
- [ ]      1  warning (invalidPrintfArgType_sint)
- [ ]      1  style (obsoleteFunctionsasctime)
- [ ]      1  performance (redundantCopy)
- [ ]      1  error (syntaxError)