- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Pro*C Error
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 04:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 04:27 AM
тАО01-30-2009 04:27 AM
Re: Pro*C Error
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 05:04 AM
тАО01-30-2009 05:04 AM
Re: Pro*C Error
That isn't valid. Using &udix is a char**. This doesn't match %s. So remove the &.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 05:19 AM
тАО01-30-2009 05:19 AM
Re: Pro*C Error
But i dont understand why & should be removed.
Can you please explain?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 05:53 AM
тАО01-30-2009 05:53 AM
Re: Pro*C Error
I get an error,
"sc_upload_loads2.c", line 381: warning #2181-D: argument is incompatible with
corresponding format string conversion
roll_size, prod_order_tons);
^
in a statement " printf ("%6d %2d %6.2f %4.2f\n", weyer_order_no, count_knives,
roll_size, prod_order_tons);"
prod_order_tons is of type int.
I get another error,
"sc_upload_loads2.c", line 1301: warning #2181-D: argument is incompatible
with corresponding format string conversion
scanf ("%f", price);
^
here price is of type float.
Please suggest.
Thanks,
Dhivya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-30-2009 11:13 PM
тАО01-30-2009 11:13 PM
Re: Pro*C Error
I already did. %s wants a char*. A char[] gets converted to a char*. But what you have gives:
warning #2144-D: a value of type "char (*)[20]" cannot be used to initialize an entity of type "char *"
char *p = &buf;
>warning #2181-D: argument is incompatible with corresponding format string conversion
>printf("%6d %2d %6.2f %4.2f\n", weyer_order_no, count_knives, roll_size, prod_order_tons);"
If you are happy with the answers please read the following on how to assign points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
>prod_order_tons is of type int.
An int doesn't match %4.2f, only a double matches.
>warning #2181-D: argument is incompatible
with corresponding format string conversion
>scanf("%f", price);
>here price is of type float.
scanf(3) wants pointers:
scanf("%f", &price);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2009 12:59 AM
тАО02-02-2009 12:59 AM
Re: Pro*C Error
Thanks a lot.
Now, we get the below error,
/usr/ccs/bin/cc -c +DD64 -I. -I../lib -I/u01/dba/oracle/product/1012ias/precomp/public down_cards.c
"down_cards.c", line 315: warning #4212-D: mismatch between character pointer
types "unsigned char *" and "char *"
varcopy(uid,uidx);
^
Here,
#define varcopy(x,y) x.len=strlen(strcpy(x.arr,y))
Declarations:
char uidx[20];
struct { unsigned short len; unsigned char arr[20]; } uid;
Please suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2009 01:13 AM
тАО02-02-2009 01:13 AM
Re: Pro*C Error
You can either ignore it, suppress it (+W4212) or use a hammer:
#define varcopy(x,y) x.len=strlen(strcpy((char*)(x.arr),y))
I'm not sure you want to change the type of "arr".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2009 08:20 PM
тАО02-02-2009 08:20 PM
Re: Pro*C Error
Regards,
Dhivya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-02-2009 08:24 PM
тАО02-02-2009 08:24 PM
Re: Pro*C Error
- « Previous
- Next »