discuss-gnustep
[Top][All Lists]
Advanced

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

"void value not ignored as it ought to be" when compiling simpleagenda w


From: Sebastian Reitenbach
Subject: "void value not ignored as it ought to be" when compiling simpleagenda with gcc-2.95
Date: Tue, 21 Jun 2011 09:10:54 +0200
User-agent: SOGoMail 1.3.7

Hi,

I get above error message, when I try to compile simpleagenda.

cc AppointmentEditor.m -c \
      -DGNUSTEP -DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 
-DGNUSTEP_BASE_LIBRARY=1 -fno-strict-aliasing -fPIC -DDEBUG 
-fno-omit-frame-pointer -Wall -DGSWARN -DGSDIAGNOSE -Wno-import -O2 -pipe -g 
-fgnu-runtime -I. -I/usr/local/include 
-I/simpleagenda-0.42_writes_to_HOME/GNUstep/Library/Headers 
-I/usr/local/include \
       -o obj/SimpleAgenda.obj/AppointmentEditor.m.o
AppointmentEditor.m: In function `-[AppointmentEditor editAlarms:]':
AppointmentEditor.m:237: void value not ignored as it ought to be


- (void)editAlarms:(id)sender
{
  NSArray *alarms = nil;

  alarms = [AlarmEditor editAlarms:_modifiedAlarms];   // here is the problem
  if (alarms)
    ASSIGN(_modifiedAlarms, alarms);
  [window makeKeyAndOrderFront:self];
}

In AppointmentEditor.m, the AlarmEditor.h file is imported, and in 
AlarmEditor.h, it is defined as:
+ (NSArray *)editAlarms:(NSArray *)alarms;

So not a void method. When I change the edtitAlarms: method in 
AppointmentEditor.m/.h to return NSArray * like its done in the AlarmEditor, 
gcc-2.95 compiles the file happily. For me it seems that the gcc is kind of 
taking the wrong editAlarms: method into account while compiling? Someone has 
seen this before, and maybe has a solution how to solve this?
gcc-4.2.1 and clang are fine with this as is.

Sebastian



reply via email to

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