Hi Jun --

I think that we could probably put together a fix for the first issue as 
well, though we don't have a gcc compiler that will generate these 
warnings (that I know of), so if there are others lurking behind this one, 
we might not catch those.  Are you able to assemble and submit a patch 
that would address it (by tomorrow for the code freeze, I'm sorry to say).

-Brad


On Mon, 31 Mar 2014, [email protected] wrote:

> Hi Jun, all --
>
> I will fix the 2nd warning, in comm-gasnet.c.
>
> greg
>
>
> On Mon, 31 Mar 2014, Jun Nakashima wrote:
>
>> When I ran the nightly test on Ubuntu Linux 13.10 with gcc
>> 4.8.0, I got two compile warnings treated as errors:
>>
>> The one has occured when compiling util/files.cpp in the
>> compiler.
>> --
>> files.cpp: In function 'const char* mysystem_getresult(const
>> char*, const char*,
>> int)':
>> files.cpp:373:41: error: ignoring return value of 'int
>> fscanf(FILE*, const char*
>> , ...)', declared with attribute warn_unused_result
>> [-Werror=unused-result]
>> fscanf(systemFile->fptr, "%s", result);
>> --
>>
>> The other has occured when compiling
>> src/comm/gasnet/comm-gasnet.c in the runtime.
>> --
>> comm-gasnet.c: In function 'AM_fork_fast':
>> comm-gasnet.c:142:10: error: ignoring return value of
>> 'write', declared with att
>> ribute warn_unused_result [-Werror=unused-result]
>> write(2, mybuf, strlen(mybuf));
>> --
>>
>> Both of the errors warn the return values are ignored. Thus
>> it may be fixed by handling the results correctly.
>> FYI, when I do the same on Debian squeeze with gcc 4.4.5 I
>> got no error. I guess these warnings are recently appended
>> to gcc.
>>
>> -
>> Jun Nakashima
>> The University of Tokyo
>>
>>
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Chapel-bugs mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/chapel-bugs
>>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Chapel-bugs mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/chapel-bugs
>

------------------------------------------------------------------------------
_______________________________________________
Chapel-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-bugs

Reply via email to