szaszm commented on a change in pull request #754: MINIFICPP-1151 fix most 1st 
party compiler warnings
URL: https://github.com/apache/nifi-minifi-cpp/pull/754#discussion_r408208365
 
 

 ##########
 File path: nanofi/src/api/nanofi.cpp
 ##########
 @@ -60,9 +60,14 @@ file_buffer file_to_buffer(const char *path) {
   rewind(fileptr);
 
   buffer = (uint8_t *)malloc((filelen+1)*sizeof(uint8_t)); // Enough memory 
for file + \0
-  fread(buffer, filelen, 1, fileptr);
+  const size_t read_result = fread(buffer, filelen, 1, fileptr);
 
 Review comment:
   `fread` is `[[nodiscard]]`

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to