From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Adrian Robert Newsgroups: gmane.emacs.devel Subject: Re: warnings on gnustep Date: Wed, 20 Aug 2008 22:50:46 -0400 Message-ID: <6EF7D92A-4643-453E-928A-832C5C8430C4@gmail.com> References: <200808070341.m773fZMo028893@sallyv1.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v926) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1219287084 4019 80.91.229.12 (21 Aug 2008 02:51:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 21 Aug 2008 02:51:24 +0000 (UTC) Cc: emacs- devel To: Dan Nicolaescu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 21 04:52:16 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KW0HU-0002y4-J9 for ged-emacs-devel@m.gmane.org; Thu, 21 Aug 2008 04:52:13 +0200 Original-Received: from localhost ([127.0.0.1]:54653 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KW0GX-0005UJ-Ao for ged-emacs-devel@m.gmane.org; Wed, 20 Aug 2008 22:51:13 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KW0GS-0005UE-Ah for emacs-devel@gnu.org; Wed, 20 Aug 2008 22:51:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KW0GQ-0005U2-KL for emacs-devel@gnu.org; Wed, 20 Aug 2008 22:51:07 -0400 Original-Received: from [199.232.76.173] (port=35125 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KW0GQ-0005Tz-F4 for emacs-devel@gnu.org; Wed, 20 Aug 2008 22:51:06 -0400 Original-Received: from yx-out-1718.google.com ([74.125.44.156]:8407) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KW0GP-0008EJ-9L for emacs-devel@gnu.org; Wed, 20 Aug 2008 22:51:06 -0400 Original-Received: by yx-out-1718.google.com with SMTP id 34so307628yxf.66 for ; Wed, 20 Aug 2008 19:51:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:cc:message-id:from:to :in-reply-to:content-type:content-transfer-encoding:mime-version :subject:date:references:x-mailer; bh=HzW17QrCQ1kY2J0WatAw8CEFjI45XGtpymQn2lSefWo=; b=OJE0pcJNfVyn5lhSWcxTPyPDuUD5G8Wder9WIDlp/MqK9WA+ldpHs+u6bBP20s2dj5 sg6RkYWJbsEXhKVkoGxttcwAOiy2vbcHOkUb+Om2JNYJ10UaeGtf6TKPxlsuN9ateUiF gKtJE1JCxPaiFGXJvQdp8c2uWu5hofBeVZsDg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=cc:message-id:from:to:in-reply-to:content-type :content-transfer-encoding:mime-version:subject:date:references :x-mailer; b=BCM3k69Cc58MqEHZsf3DrpBIo+qgMI8sbDysDkrknL9qCHQkhpSjBGVRczf9o5Ly26 JLg3HMEhYQCxcvKWZdDOoomvm6BkDP/LZntE7xp4M+PWO9L/P8QBQ6oaiFf5PvrTSKjy JKhspobUw1uJ4synWnFoyai/+jkWxGULbD6JQ= Original-Received: by 10.151.147.16 with SMTP id z16mr1242777ybn.128.1219287063725; Wed, 20 Aug 2008 19:51:03 -0700 (PDT) Original-Received: from ?10.0.1.200? ( [72.169.150.82]) by mx.google.com with ESMTPS id 9sm2782078yxs.5.2008.08.20.19.50.57 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 20 Aug 2008 19:51:02 -0700 (PDT) In-Reply-To: <200808070341.m773fZMo028893@sallyv1.ics.uci.edu> X-Mailer: Apple Mail (2.926) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:102755 Archived-At: On Aug 6, 2008, at 11:41 PM, Dan Nicolaescu wrote: > I managed to get access to a machine that has a gnustep > installation. I > get these warnings when compiling the ns*.m files. > > The 'lrint' looks strange, on my Fedora systems lrint is in > which is included. I haven't looked at why this happens. Some brief googling suggests this has something to do with various C standards and arguments like -std=c99. I don't understand this at all, but if you look in that math.h are the lrint definitions protected by any ifdefs? Also I wonder what effect that -D_BSD_SOURCE has and where is that coming from? > But the signal ones are probably something to worry about. Which ones are you talking about? (The word "signal" is not appearing in the warnings below.) > BTW, I think that the includes need to be reordered, if you look in > all > the other files in emacs config.h is the first file included, that is > not the case in the ns*.m files. Hmm, these other files also seem to include , as if it's a system include, rather than "config.h". I don't understand why. The NS files include system includes first, then local ones, and "config.h" is the first of these. I'm going to comment on other stuff below individually. > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/jars/ > emacs/src -D_BSD_SOURCE -D_REENTRANT -fPIC -fno-strict-aliasing - > g -O2 -Wno-pointer-sign -I/usr/include/GNUstep -fgnu-runtime -Wno- > import -fconstant-string-class=NSConstantString - > DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN > -DGSDIAGNOSE nsterm.m > nsterm.m: In function 'ns_update_end': > nsterm.m:658: warning: 'NSView' may not respond to '- > unlockFocusNeedsFlush:' > nsterm.m:658: warning: (Messages without a matching method signature > nsterm.m:658: warning: will be assumed to return 'id' and accept > nsterm.m:658: warning: '...' as arguments.) Should be gone now (but someone on GNUstep please test). > nsterm.m: In function 'ns_color_to_lisp': > nsterm.m:1549: warning: incompatible implicit declaration of built- > in function 'lrint' > nsterm.m:1555: warning: incompatible implicit declaration of built- > in function 'lrint' > nsterm.m: In function 'ns_mouse_position': > nsterm.m:1765: warning: incompatible implicit declaration of built- > in function 'lrint' > nsterm.m: In function 'ns_draw_window_cursor': > nsterm.m:2375: warning: incompatible implicit declaration of built- > in function 'lrint' Discussed above. > nsterm.m: In function 'ns_read_socket': > nsterm.m:3072: warning: 'NSApplication' may not respond to '- > openFile:' I added a cast to fix this. > nsterm.m: In function '-[EmacsApp application:openFiles:]': > nsterm.m:4153: warning: 'EmacsApp' may not respond to '- > replyToOpenOrPrint:' This whole delegate method is undeclared / unused in GNUstep. I put the replyToOpenOrPrint call inside #ifndef GNUSTEP, although when it eventually implements it this would need updating. Might be better to just live w/the warning since it will never cause an error. > nsterm.m: In function '-[EmacsView changeFont:]': > nsterm.m:4332: warning: incompatible implicit declaration of built- > in function 'lrint' > nsterm.m: In function '-[EmacsView setMarkedText:selectedRange:]': > nsterm.m:4570: warning: pointer type mismatch in conditional > expression Not sure what the problem is here. > nsterm.m: In function '-[EmacsView mouseDown:]': > nsterm.m:4764: warning: incompatible implicit declaration of built- > in function 'lrint' > nsterm.m: In function '-[EmacsView performDragOperation:]': > nsterm.m:5379: warning: incompatible implicit declaration of built- > in function 'lrint' > nsterm.m: In function 'ns_font_to_xlfd': > nsterm.m:6261: warning: incompatible implicit declaration of built- > in function 'lrint' > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/jars/ > emacs/src -D_BSD_SOURCE -D_REENTRANT -fPIC -fno-strict-aliasing - > g -O2 -Wno-pointer-sign -I/usr/include/GNUstep -fgnu-runtime -Wno- > import -fconstant-string-class=NSConstantString - > DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN > -DGSDIAGNOSE nsfns.m > nsfns.m: In function 'Fns_read_file_name': > nsfns.m:1451: warning: pointer type mismatch in conditional expression I added a cast to id? > nsfns.m: In function 'Fns_convert_utf8_nfd_to_nfc': > nsfns.m:2003: warning: no '-precomposedStringWithCanonicalMapping' > method found Hmm. I changed to check for the impl and warn/return Qnil if not present, but the compiler warning will still be there. > nsfns.m: In function 'Fxw_color_values': > nsfns.m:2249: warning: incompatible implicit declaration of built-in > function 'lrint' > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/jars/ > emacs/src -D_BSD_SOURCE -D_REENTRANT -fPIC -fno-strict-aliasing - > g -O2 -Wno-pointer-sign -I/usr/include/GNUstep -fgnu-runtime -Wno- > import -fconstant-string-class=NSConstantString - > DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN > -DGSDIAGNOSE nsmenu.m > nsmenu.m: In function '-[EmacsMenu fillWithWidgetValue:]': > nsmenu.m:684: warning: passing argument 1 of 'setAction:' from > incompatible pointer type setAction: takes a SEL. I thought nil was correct? > nsmenu.m: In function '-[EmacsMenu addSubmenuWithTitle:forFrame:]': > nsmenu.m:705: warning: passing argument 2 of > 'addItemWithTitle:action:keyEquivalent:' from incompatible pointer > type Ditto. > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/jars/ > emacs/src -D_BSD_SOURCE -D_REENTRANT -fPIC -fno-strict-aliasing - > g -O2 -Wno-pointer-sign -I/usr/include/GNUstep -fgnu-runtime -Wno- > import -fconstant-string-class=NSConstantString - > DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN > -DGSDIAGNOSE nsselect.m > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/jars/ > emacs/src -D_BSD_SOURCE -D_REENTRANT -fPIC -fno-strict-aliasing - > g -O2 -Wno-pointer-sign -I/usr/include/GNUstep -fgnu-runtime -Wno- > import -fconstant-string-class=NSConstantString - > DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN > -DGSDIAGNOSE nsimage.m > nsimage.m: In function '-[EmacsImage getPixelAtX:Y:]': > nsimage.m:417: warning: 'NSBitmapImageRep' may not respond to '- > colorAtX:y:' > nsimage.m:417: warning: (Messages without a matching method signature > nsimage.m:417: warning: will be assumed to return 'id' and accept > nsimage.m:417: warning: '...' as arguments.) > nsimage.m: In function '-[EmacsImage > setPixelAtX:Y:toRed:green:blue:alpha:]': > nsimage.m:447: warning: 'NSBitmapImageRep' may not respond to '- > setColor:atX:y:' > nsimage.m: In function '-[EmacsImage setAlphaAtX:Y:to:]': > nsimage.m:464: warning: 'NSBitmapImageRep' may not respond to '- > colorAtX:y:' > nsimage.m:466: warning: 'NSBitmapImageRep' may not respond to '- > setColor:atX:y:' I don't understand these. Both methods are declared for NSBitmapImageRep in GNUstep: http://www.gnustep.org/resources/documentation/Developer/Gui/Reference/NSBitmapImageRep.html#class$NSBitmapImageRep > gcc -c -D_BSD_SOURCE -Demacs -DHAVE_CONFIG_H -I. -I/home/jars/ > emacs/src -D_BSD_SOURCE -D_REENTRANT -fPIC -fno-strict-aliasing - > g -O2 -Wno-pointer-sign -I/usr/include/GNUstep -fgnu-runtime -Wno- > import -fconstant-string-class=NSConstantString - > DGNUSTEP_BASE_LIBRARY=1 -DGNU_GUI_LIBRARY=1 -DGNU_RUNTIME=1 -DGSWARN > -DGSDIAGNOSE nsfont.m > nsfont.m: In function 'nsfont_open': > nsfont.m:682: warning: incompatible implicit declaration of built-in > function 'lrint' > nsfont.m: In function 'nsfont_draw': > nsfont.m:925: warning: comparison is always true due to limited > range of data type cbuf and c should probably be made unsigned char, but only someone who can test should try this. > nsfont.m:994: warning: pointer type mismatch in conditional expression Unsure why, all should be NSColor *. > nsfont.m:1019: warning: comparison between pointer and integer > nsfont.m:1025: warning: comparison between pointer and integer I've fixed these. > nsfont.m: In function 'ns_glyph_metrics': > nsfont.m:1384: warning: incompatible implicit declaration of built- > in function 'lrint' > nsfont.m:1389: warning: incompatible implicit declaration of built- > in function 'round'