cinstallationscanffestival

warning in ubuntu in return value of 'fscanf'


installing festival speech synthesis system from http://festvox.org/ ...directly by running general script. Facing below given problem .....this problem will effect my working on festival framework or not ?????

eps.c: In function ‘getd’:

eps.c:142:7: warning: ignoring return value of ‘fscanf’, declared with attribute warn_unused_result [-Wunused-result]

   fscanf(fp, "%d %d", x, y);
   ^

Solution

  • This warning says that not checking the return value of scanf is not a really good idea.

    I thought casting to (void) was a way to avoid that but apparently it is not as discussed here: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=25509

    However it is not an error that you get but just a warning (your title is kinda misleading)

    If the value is not used it is clearly not a problem.