[WIP] Fix clang analysis warnings. (4)

Continues #1389, #1431, and #1460 .

This fixes **4** warnings in:
- tag.c

I will be adding to this PR until no warning remains (16 if no new ones appear in between).