delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/11/16/18:15:20

From: jvasquez AT getntds DOT com (John Vasquez)
Newsgroups: comp.os.msdos.djgpp
Subject: warning: `struct MyStruct' declared inside parameter list
Message-ID: <3a1455f7.1211889044@news.connectnet.com>
X-Newsreader: Forte Free Agent 1.21/32.243
Lines: 35
Date: Thu, 16 Nov 2000 22:59:43 GMT
NNTP-Posting-Host: 207.110.36.153
X-Trace: news.connectnet.com 974415705 207.110.36.153 (Thu, 16 Nov 2000 15:01:45 PST)
NNTP-Posting-Date: Thu, 16 Nov 2000 15:01:45 PST
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Newbie:
Trying to convert and existing DOS 16-program to 32-bit.

The original program was written in Microsoft C V6.0.

I get the following error:
In file included from def1.h:57,
                 from code.c:22:
proto.h:8: warning: `struct MyStruct' declared inside parameter list
proto.h:8: warning: its scope is only this definition or declaration,
which is probably not what you want.
What does that mean? I haven't been able to figure it out.

In my def1.h file I have a structure defined:

struct MyStruct
{
	int field1
	int field2
};

In proto .h file I define the function proto type as
int MyFunction(struct MyStruct *);

In the code.c file I define the structure:
#include def1.h
#include proto.h
int MyFunction(struct MyStruct *ptr)
{
	MyCode;
	.
	.
	.
	return stuff;
}

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019