I'm currently trying to create a little test program that uses the toolkit. However, I don't really understand a few things about setting up the syncHdr. When I try to setup the various fields with suitable values, compiler (GCC 2.96 and EGCS 2.91 tested) gives warnings such as:
syncmltoolkittest.c:35: warning: assignment makes pointer from integer without a cast
when the line is similar to the examples presented in documentation:
syncHdr.version = buildPCData("1.0");
Similar results happen with every line that uses buildPCData.
Additionally, both
syncHdr.target = target;
and
syncHdr.source = source;
cause compiler to bail out with message:
syncmltoolkittest.c:44: incompatible types in assignment
I've defined syncHdr as:
SmlSyncHdr_t syncHdr;
I'm somewhat confused by the fact that in the source code buildPCData function has two argument; however, the example only supplies one. I've tried to look at the provided documentation, but it doesn't seem to cover this area.
The platform is Linux (RH 7.3).
(I know that the example is not supposed to be a really working piece of code and I've figured some differences between the example and reality out by looking at the documentation and source code. But I've been stuck on these for a few days now...)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello,
I'm currently trying to create a little test program that uses the toolkit. However, I don't really understand a few things about setting up the syncHdr. When I try to setup the various fields with suitable values, compiler (GCC 2.96 and EGCS 2.91 tested) gives warnings such as:
syncmltoolkittest.c:35: warning: assignment makes pointer from integer without a cast
when the line is similar to the examples presented in documentation:
syncHdr.version = buildPCData("1.0");
Similar results happen with every line that uses buildPCData.
Additionally, both
syncHdr.target = target;
and
syncHdr.source = source;
cause compiler to bail out with message:
syncmltoolkittest.c:44: incompatible types in assignment
I've defined syncHdr as:
SmlSyncHdr_t syncHdr;
I'm somewhat confused by the fact that in the source code buildPCData function has two argument; however, the example only supplies one. I've tried to look at the provided documentation, but it doesn't seem to cover this area.
The platform is Linux (RH 7.3).
(I know that the example is not supposed to be a really working piece of code and I've figured some differences between the example and reality out by looking at the documentation and source code. But I've been stuck on these for a few days now...)
Hi,
I don't use buildPCData, I use smlString2Pcdata instead. Have a look at the file mgrutil.h for available useful functions for managing Pcdata type