On Mon, Jan 24, 2005 at 12:44:51PM -0300, Haroldo Lage wrote:
Haroldo,
The problem is that 'h' is a size specifier, it says that the object is a
short. You must also specify a type, probably 'd' for a signed integer or
'u' for an unsigned integer. So the line should be:
scanf("%hd",&buffer[0]);
If you are on a Linux system (or any UNIX-like system, even Cygwin) you
should be able to run 'man sprintf' to get more documentation.
Frank
> Hi all,
>
> This is my first post, hope the next ones I'll help more the be helped.
> I currently porting a medium sized project (~15k lines) from IAR running
> on Windows to mspgcc running on Linux. It is a test port, we intend to
> change our platform and Linux + mspgcc, is our target.
> So here is our problem, after changes in the source code, to syntax
> adequation. We are having problems to port an specific function, printf
> and scanf, due to the following error:
>
> util.c: In function `TrataMenu':
> util.c:1466: warning: conversion lacks type at end of format
> util.c:1466: warning: too many arguments for format
>
> And repeat on and on each time the following structure occurs
> printf("\n\rIP[1] = ");
> scanf("%h",&buffer[0]);
>
> I use gdbproxy 0.7.1, GDB 6.0 and msp430-gcc 3.2.3
>
> Can somebody help me on this porting issue?
>
> Thanks in advance,
>
> Haroldo Lage
> Embedded Systems Developer
> http://www.bios.srv.br
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
> Tool for open source databases. Create drag-&-drop reports. Save time
> by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
> Download a FREE copy at http://www.intelliview.com/go/osdn_nl
> _______________________________________________
> Mspgcc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mspgcc-users