|
|||||||||||
Technical Support Support Resources
Product Information |
C251: Extended scanf Argument Data SpaceInformation in this article applies to:
QUESTIONI understand that the total number of bytes of arguments you can pass to a function using a variable-length argument list is limited. The limit is just 40 bytes for the LARGE memory model. That amounts to ten 4-byte arguments. I need to pass more than that to the scanf function. In my application I must convert a very long command string that contains 16 HEX values. The sscanf invocation appears as follows:
When I compile this module I receive the following error message:
How can I overcome this problem? ANSWERA simple solution to your problem is to use the reentrant version of the sscanf function. You may do this by adding the #pragma function statements around the stdio.h include file. For example:
A problem with this solution is that your application may use a large amount of the hardware stack. To avoid this, you can extend the parameter area of the static scanf function as follows:
MORE INFORMATION
Last Reviewed: Thursday, February 25, 2021 | ||||||||||
|
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.