Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set missing default value.
tsv.c:105:16: warning: variable 'encoding' is used uninitialized whenever 'if'
condition is false [-Wsometimes-uninitialized]
} else if (strncasecmp(encoding_name, "KOI8-R", strlen("KOI8-R")) == 0 ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tsv.c:114:10: note: uninitialized use occurs here
return encoding;
^~~~~~~~
tsv.c:105:12: note: remove the 'if' if its condition is always true
} else if (strncasecmp(encoding_name, "KOI8-R", strlen("KOI8-R")) == 0 ||
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
tsv.c:79:3: note: variable 'encoding' is declared here
grn_encoding encoding;
^- Loading branch information