You may need to add 'void' to clarify that there are no parameters in the C
header, as in

extern void broadwayOnHeadersDecoded(void);

The other warnings stem from EXPORTED_FUNCTIONS in the emcc invocation.
HEAP8 etc. shouldn't be in that list, it's just for functions.

JS library functions (extern C, implemented in .js file used by
--js-library) are normally not exported, as they are used from compiled
code. It does look like they are exported (on the Module object) if
requested, but the warning is spurious. It's not trivial to fix, sadly.

But if you are not using them from compiled code, and you are not using
them when exported on Module, there is no need to export them.

- Alon


On Fri, Feb 6, 2015 at 9:42 AM, Stefano Sabatini <[email protected]> wrote:

> Hi all,
>
> I'm trying to fix some issues related to Broadway, and I need to fix
> some issues.
>
> The warnings are the following:
> warning: unexpected number of arguments 0 in call to
> 'broadwayOnHeadersDecoded', should be 1
> WARNING  root: function requested to be exported, but not implemented:
> "HEAP8"
> WARNING  root: function requested to be exported, but not implemented:
> "HEAP16"
> WARNING  root: function requested to be exported, but not implemented:
> "HEAP32"
> WARNING  root: function requested to be exported, but not implemented:
> "_main"
> WARNING  root: function requested to be exported, but not implemented:
> "_broadwayOnHeadersDecoded"
> WARNING  root: function requested to be exported, but not implemented:
> "_broadwayOnPictureDecoded"
>
> About the first one:
> warning: unexpected number of arguments 0 in call to
> 'broadwayOnHeadersDecoded', should be 1
>
> The JS function is defined in library.js:
>   broadwayOnHeadersDecoded: function () {
>       _broadwayOnHeadersDecoded();
>   },
>
> broadwayOnHeadersDecoded() is declared in the C code as:
> extern void broadwayOnHeadersDecoded();
>
> and called in an internal routine with the code:
>             broadwayOnHeadersDecoded();
>
> and _broadwayOnHeadersDecoded is in the list of the exported
> functions.
>
> So I'd expect that the correct number of arguments to pass to the
> function is 0, and so I can't explain the warning message.
>
> ...
>
> The other warnings are of the kind:
> WARNING  root: function requested to be exported, but not implemented:
> "XXX"
>
> While I see that HEAP8, HEAP16, and HEAP32, and main functions are not
> defined in the code, the functions broadwayOnHeadersDecoded() and
> broadwayOnPictureDecoded() are only declared with extern and defined
> (I think) through the library.js mechanism.
>
> If I remove _broadwayOnHeadersDecoded/OnPictureDecoded from the list
> of exported functions I got no behavior difference, so I have to
> suppose that the functions defined in JS code (declared as extern in C
> code, and called from C code) should not be referenced in the list of
> exported functions. Is that supposition correct?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to