Compiler warning extravaganza on Tiger PPC

14 views
Skip to first unread message

dv1...@wayne.edu

unread,
Jun 9, 2013, 1:15:11 AM6/9/13
to vim...@googlegroups.com
Here on Tiger PPC I updated to 7.3.1148.

Here is a new compiler warning I haven't seen yet; it occurred during
the plain Vim portion of building MacVim.

In file included from regexp.c:7891:
regexp_nfa.c: In function ‘post2nfa’:
regexp_nfa.c:2754: warning: ‘end_state’ may be used uninitialized in this function
regexp_nfa.c:2753: warning: ‘start_state’ may be used uninitialized in this function
regexp_nfa.c: In function ‘addstate’:
regexp_nfa.c:3378: warning: ‘save_lpos.col’ may be used uninitialized in this function
regexp_nfa.c:3378: warning: ‘save_lpos.lnum’ may be used uninitialized in this function
regexp_nfa.c:3380: warning: ‘save_ptr’ may be used uninitialized in this function
regexp_nfa.c: In function ‘nfa_regmatch’:
regexp_nfa.c:4363: warning: ‘add_off’ may be used uninitialized in this function

Then later, during the Mac-specific portion of building MacVim, I saw
these warnings (also never seen until 7.3.1148):

/Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fobjc-exceptions -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -I/macvim/src/MacVim/build/MacVim.build/Release/MacVim.build/MacVim.hmap -mdynamic-no-pic -F/macvim/src/MacVim/build/Release -F/macvim/src/MacVim -I/macvim/src/MacVim/build/Release/include -I/macvim/src/MacVim/build/MacVim.build/Release/MacVim.build/DerivedSources -c /macvim/src/MacVim/MMTextView.m -o /macvim/src/MacVim/build/MacVim.build/Release/MacVim.build/Objects-normal/ppc/MMTextView.o
/macvim/src/MacVim/MMTextView.m: In function ‘-[MMTextView checkImState]’:
/macvim/src/MacVim/MMTextView.m:322: warning: ‘MMTextViewHelper’ may not respond to ‘-checkImState’
/macvim/src/MacVim/MMTextView.m:322: warning: (Messages without a matching method signature
/macvim/src/MacVim/MMTextView.m:322: warning: will be assumed to return ‘id’ and accept
/macvim/src/MacVim/MMTextView.m:322: warning: ‘...’ as arguments.)

And here too:

/Developer/usr/bin/gcc-4.0 -x objective-c -arch ppc -pipe -Wno-trigraphs -fobjc-exceptions -fpascal-strings -fasm-blocks -Os -Wreturn-type -Wunused-variable -fmessage-length=0 -mtune=G5 -fvisibility=hidden -I/macvim/src/MacVim/build/MacVim.build/Release/MacVim.build/MacVim.hmap -mdynamic-no-pic -F/macvim/src/MacVim/build/Release -F/macvim/src/MacVim -I/macvim/src/MacVim/build/Release/include -I/macvim/src/MacVim/build/MacVim.build/Release/MacVim.build/DerivedSources -c /macvim/src/MacVim/MMAtsuiTextView.m -o /macvim/src/MacVim/build/MacVim.build/Release/MacVim.build/Objects-normal/ppc/MMAtsuiTextView.o
/macvim/src/MacVim/MMAtsuiTextView.m: In function ‘-[MMAtsuiTextView checkImState]’:
/macvim/src/MacVim/MMAtsuiTextView.m:376: warning: ‘MMTextViewHelper’ may not respond to ‘-checkImState’
/macvim/src/MacVim/MMAtsuiTextView.m:376: warning: (Messages without a matching method signature
/macvim/src/MacVim/MMAtsuiTextView.m:376: warning: will be assumed to return ‘id’ and accept
/macvim/src/MacVim/MMAtsuiTextView.m:376: warning: ‘...’ as arguments.)

Finally, here are some compiler warnings from the plain Vim portion that
seem to have been around for ages on Tiger PPC (especially the latter):

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/eval.o eval.c
eval.c: In function ‘get_lval’:
eval.c:2729: warning: ‘prevval’ may be used uninitialized in this function

and,

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/search.o search.c
search.c: In function ‘current_search’:
search.c:4521: warning: ‘save_VIsual.coladd’ may be used uninitialized in this function
search.c:4521: warning: ‘save_VIsual.col’ may be used uninitialized in this function
search.c:4521: warning: ‘save_VIsual.lnum’ may be used uninitialized in this function

dv1...@wayne.edu

unread,
Jun 9, 2013, 1:44:13 PM6/9/13
to vim...@googlegroups.com
I now see that all of those compiler warnings exist on 10.5.8 PPC also.

-gmn

Bram Moolenaar

unread,
Jun 9, 2013, 2:49:29 PM6/9/13
to dv1...@wayne.edu, vim...@googlegroups.com

dv1445 wrote:

> Here on Tiger PPC I updated to 7.3.1148.
>
> Here is a new compiler warning I haven't seen yet; it occurred during
> the plain Vim portion of building MacVim.
>
> In file included from regexp.c:7891:
> regexp_nfa.c: In function �post2nfa�:
> regexp_nfa.c:2754: warning: �end_state� may be used uninitialized in this function
> regexp_nfa.c:2753: warning: �start_state� may be used uninitialized in this function

I think I can fix these.

> regexp_nfa.c: In function �addstate�:
> regexp_nfa.c:3378: warning: �save_lpos.col� may be used uninitialized in this function
> regexp_nfa.c:3378: warning: �save_lpos.lnum� may be used uninitialized in this function
> regexp_nfa.c:3380: warning: �save_ptr� may be used uninitialized in this function

Can't fix these without adding overhead.

> regexp_nfa.c: In function �nfa_regmatch�:
> regexp_nfa.c:4363: warning: �add_off� may be used uninitialized in this function

I can fix this one.

> Finally, here are some compiler warnings from the plain Vim portion that
> seem to have been around for ages on Tiger PPC (especially the latter):
>
> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/eval.o eval.c
> eval.c: In function �get_lval�:
> eval.c:2729: warning: �prevval� may be used uninitialized in this function

Can be fixed at a small price.

>
> gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_MACVIM -Wall -Wno-unknown-pragmas -pipe -DMACOS_X_UNIX -no-cpp-precomp -g -O -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -o objects/search.o search.c
> search.c: In function �current_search�:
> search.c:4521: warning: �save_VIsual.coladd� may be used uninitialized in this function
> search.c:4521: warning: �save_VIsual.col� may be used uninitialized in this function
> search.c:4521: warning: �save_VIsual.lnum� may be used uninitialized in this function

Not so easy to fix.

--
hundred-and-one symptoms of being an internet addict:
125. You begin to wonder how often it REALLY is necessary to get up
and shower or bathe.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages