gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GNUstep core release


From: Barnaby Jones
Subject: Re: GNUstep core release
Date: Sat, 02 May 2015 15:06:49 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Not a regression but I get a lot of no-brainer warnings during compilation of the base package.

For example this will create an error during runtime:

NSCalendarDate.m:1778:7: warning: using integer absolute value function 'abs' when argument is of floating point type [-Wabsolute-value]
  a = abs(d - (_seconds_since_ref + offset(_time_zone, self)));
      ^
NSCalendarDate.m:1778:7: note: use function 'fabs' instead
  a = abs(d - (_seconds_since_ref + offset(_time_zone, self)));
      ^~~
      fabs

abs will treat the result as int and the result will be defective.

Another example is:

/usr/GNUstep/Local/Library/Headers/objc/runtime.h:195:13: note: expanded from macro 'NO'
#       define NO ((BOOL)0)


AGSOutput.m:2412:14: warning: expression which evaluates to zero treated as a null pointer constant of type 'NSString *' [-Wnon-literal-null-conversion]
      return NO;

Not a problem during runtime but still an ugly warning.

Finally I get this warning with the clang 3.7 compiler:

In file included from /usr/include/string.h:25:
/usr/include/features.h:148:3: warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-W#warnings]
# warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"

this could be handled with __clang_version__



reply via email to

[Prev in Thread] Current Thread [Next in Thread]