Valgrind Error: Conditional jump or move depends on uninitialised value

Getting the Valgrind Error Conditional jump or move depends on uninitialised value(s) . 
After debug the error is found to be in the function
int BrigIO::load(BrigContainer &dst, int fmt, ReadAdapter&  src) in HSAILBrigObjectFile.cpp  file, as missing check.

The small test case to reproduce the error:
[if a.txt is empty]

#include<unistd.h>
#include<stdio.h>
#include<fcntl.h>
int main()
{
     unsigned char data[16];
     char *filename = "a.txt";
     int fd = open(filename, O_RDONLY, 0666);
     int rc = read(fd, data, 16);
     if (data[0] == '\n') printf("Success\n"); // rc && data[0]
return 1;
}