VMD-L Mailing List
From: John Jumper (jumper_at_uchicago.edu)
Date: Thu Jan 10 2013 - 21:08:22 CST
- Next message: Shaherin Basith: "Autoionize error in VMD"
- Previous message: Jiawei Xu: "Re: Error in loading large trajectories"
- Next in thread: John Stone: "Re: Potential memory consumption bug in VMD 1.9.1"
- Reply: John Stone: "Re: Potential memory consumption bug in VMD 1.9.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
When compiling the source for VMD on OS X Lion using clang, I
encountered the warning below. I am not familiar at all with this
source, but the code written certainly looks like a bug due to
mistaken operator precedence. Please disregard if I am not correct.
Compiling QuickSurf.C --> QuickSurf.o ...
QuickSurf.C:531:58: warning: operator '?:' has lower precedence than
'+'; '+' will be evaluated first [-Wparentheses]
long volmemtexszkb = (volmemszkb + (voltexmap != NULL) ? 3*volmemszkb : 0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
QuickSurf.C:531:58: note: place parentheses around the '+' expression
to silence this warning
long volmemtexszkb = (volmemszkb + (voltexmap != NULL) ? 3*volmemszkb : 0);
^
( )
QuickSurf.C:531:58: note: place parentheses around the '?:' expression
to evaluate it first
long volmemtexszkb = (volmemszkb + (voltexmap != NULL) ? 3*volmemszkb : 0);
^
( )
1 warning generated.
Best regards,
John Jumper
- Next message: Shaherin Basith: "Autoionize error in VMD"
- Previous message: Jiawei Xu: "Re: Error in loading large trajectories"
- Next in thread: John Stone: "Re: Potential memory consumption bug in VMD 1.9.1"
- Reply: John Stone: "Re: Potential memory consumption bug in VMD 1.9.1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]