Compile time warnings 
Author Message
 Compile time warnings

Hi all,

I have ported TCL8.3.2 for Unix on Windows NT using a Unix to Windows
toolkit.
The VC++ 6.0 compiler is used .
I get lot of compile time warnings like the following.

.\..\generic\tclStubInit.c(90) : warning C4113: 'struct Tcl_Channel_
*(__cdecl *
)(int )' differs in parameter lists from 'int (__cdecl *)(char
*,unsigned long ,
long ,unsigned long *)'
.\..\generic\tclStubInit.c(90) : warning C4047: 'initializing' : 'int
(__cdecl *
)(char *,unsigned long ,long ,unsigned long *)' differs in levels of
indirection
 from 'struct Tcl_Channel_ *(__cdecl *)(int )'

The MSDN help on warning C4113 says
'identifier1' differs in parameter lists from 'identifier2'

A function pointer was assigned to another function pointer, but the
formal parameter lists of the functions do not agree.

I actually am not able to figure out where to modify to prevent these
warnings
and how serious these warnings are.

Thanks for any help

Pranjal



Mon, 24 Nov 2003 14:04:09 GMT  
 Compile time warnings

Quote:

>Hi all,

>I have ported TCL8.3.2 for Unix on Windows NT using a Unix to Windows
>toolkit.

Why?  What's wrong with using the already ported (and native) code located in
the /win subdirectory?

Quote:
>The VC++ 6.0 compiler is used .
>I get lot of compile time warnings like the following.

>.\..\generic\tclStubInit.c(90) : warning C4113: 'struct Tcl_Channel_
>*(__cdecl *
>)(int )' differs in parameter lists from 'int (__cdecl *)(char
>*,unsigned long ,
>long ,unsigned long *)'
>.\..\generic\tclStubInit.c(90) : warning C4047: 'initializing' : 'int
>(__cdecl *
>)(char *,unsigned long ,long ,unsigned long *)' differs in levels of
>indirection
> from 'struct Tcl_Channel_ *(__cdecl *)(int )'

>The MSDN help on warning C4113 says
>'identifier1' differs in parameter lists from 'identifier2'

>A function pointer was assigned to another function pointer, but the
>formal parameter lists of the functions do not agree.

>I actually am not able to figure out where to modify to prevent these
>warnings
>and how serious these warnings are.

>Thanks for any help

>Pranjal

Pranjal,

You have a tclDecls.h and a tclStubInit.c discrepancy.  The versions don't
match.

'struct Tcl_Channel_*(__cdecl *)(int )' and
'int (__cdecl *)(char*,unsigned long ,long ,unsigned long *)'

are not even close.

Line 90 is this for me:

    TclFormatInt, /* 24 */

Somehow the positions aren't lining up for a match.  tclDecls.h says one thing
and tclStubInit.c is saying something else.  You might want to check your
include paths when building so it isn't grabbing the wrong tcl.h.  This is not
the case for any of the releases.

If you have modified the Stubs table for something specific you're doing, you
must regenerate tclStubInit.c from the makefile with the genstubs target.  See
the makefile for the details.
--



Mon, 24 Nov 2003 14:50:42 GMT  
 Compile time warnings

Quote:


> >Hi all,

> >I have ported TCL8.3.2 for Unix on Windows NT using a Unix to Windows
> >toolkit.

> Why?  What's wrong with using the already ported (and native) code located in
> the /win subdirectory?

> >The VC++ 6.0 compiler is used .
> >I get lot of compile time warnings like the following.

> >.\..\generic\tclStubInit.c(90) : warning C4113: 'struct Tcl_Channel_
> >*(__cdecl *
> >)(int )' differs in parameter lists from 'int (__cdecl *)(char
> >*,unsigned long ,
> >long ,unsigned long *)'
> >.\..\generic\tclStubInit.c(90) : warning C4047: 'initializing' : 'int
> >(__cdecl *
> >)(char *,unsigned long ,long ,unsigned long *)' differs in levels of
> >indirection
> > from 'struct Tcl_Channel_ *(__cdecl *)(int )'

> >The MSDN help on warning C4113 says
> >'identifier1' differs in parameter lists from 'identifier2'

> >A function pointer was assigned to another function pointer, but the
> >formal parameter lists of the functions do not agree.

> >I actually am not able to figure out where to modify to prevent these
> >warnings
> >and how serious these warnings are.

> >Thanks for any help

> >Pranjal

> Pranjal,

> You have a tclDecls.h and a tclStubInit.c discrepancy.  The versions don't
> match.

> 'struct Tcl_Channel_*(__cdecl *)(int )' and
> 'int (__cdecl *)(char*,unsigned long ,long ,unsigned long *)'

> are not even close.

> Line 90 is this for me:

>     TclFormatInt, /* 24 */

> Somehow the positions aren't lining up for a match.  tclDecls.h says one thing
> and tclStubInit.c is saying something else.  You might want to check your
> include paths when building so it isn't grabbing the wrong tcl.h.  This is not
> the case for any of the releases.

> If you have modified the Stubs table for something specific you're doing, you
> must regenerate tclStubInit.c from the makefile with the genstubs target.  See
> the makefile for the details.

Thanks David for  your response. Following your advice all my warnings
disappeared in a single shot. What I did was do  make checkstubs ,
then do make genstubs followed by a make clean and make all.
As for why I am porting tcl instead of using the windows port, it is
my employer's wish. Maybe it is to maintain uniformity with other Unix
tools in a Unix environment. Thanks again

Pranjal



Mon, 24 Nov 2003 18:51:01 GMT  
 Compile time warnings
        ...

Quote:
> As for why I am porting tcl instead of using the windows port, it is
> my employer's wish. Maybe it is to maintain uniformity with other Unix
> tools in a Unix environment. Thanks again

Did you know that Microsoft Interix and cygwin both have ports of
Tcl based on the Unix code bases?  I believe both are currently
at v8.0 though.

--
  Jeff Hobbs                     The Tcl Guy
  Senior Developer               http://www.ActiveState.com/
      Tcl Support and Productivity Solutions



Tue, 25 Nov 2003 15:55:43 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Warnings at compile time for possible runtime pattern matching failure

2. compile-time-too/not-compile-time

3. Compile-time vs Run-time

4. Doing run-time checks at compile-time

5. CW2.003 - hand coded reports compile warning - help!

6. HELP!!! Compile Warnings and Errors

7. how to compile and a set of .prg file I am getting this warning

8. ADA Compile Warning

9. compile warning

10. rm/cobol85 compile warning

11. Warning compiling data structure

12. Problems with DVF (warning messages and compiling the wrong files)

 

 
Powered by phpBB® Forum Software