Fix CodeSniffer and warnings in includes/db

Follow-up with a slightly wider scope to e611604d10897f.

Change-Id: I9bb5ef0ceef0cd7a9c044e675b953db6d3b35407
Merge "Fix CodeSniffer and warnings in includes/db"