- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: DEC warnings
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
тАО11-29-2005 07:33 AM
тАО11-29-2005 07:33 AM
Re: DEC warnings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2005 08:23 AM
тАО11-29-2005 08:23 AM
Re: DEC warnings
OK, here's what I mean by a short reproducer!
main(){
globalvalue int X;
struct Y {unsigned short a;};
static struct Y readonly Z[]={X};
}
Your NDMEVL$* symbols, defined in NDM$EVENT_TYPE.H are all "globalvalue int". They're used to initialize elements of the array EVENT_DESCRIPTION_TABLE. Elements are of type "event_description_entry", and the initialized fields "type" and "class" are both declared as "unsigned short".
This is a type mismatch. You're trying to fit an int into a short.
If these were COMPILE TIME constants, the compiler could check that the "int" values fit into a "short" field, and warn you if there was any truncation.
Since, "globalvalue" are LINK TIME constants, it's up to the linker to do the initialization and possibly truncation of the value, again with a warning if data was lost. However, if those symbols are resolved from a shareable image, instead of an object module, then they're RUN TIME constants, and performing the correct initialization, truncation & warning is way beyond the capabilities of the image activator.
This is what the compiler is warning you about.
So, if you KNOW absolutely that these values will never exceed the size of a "short" field, then ignore the warning. If not, then you'd be better off defining the fields to be "int" instead of "short". Alternatively, you could define the symbols as "globalvalue short". It all depends on where and how the values of the symbols are defined. You should be able to determine that from the linker MAP file.
Bottom line is, you need to resolve the type mismatch to make the compiler happy.
From the look of the code, I'd say changing "type" and "class" to "unsigned int" should be safe. It will make the table slightly bigger, but memory is cheap! The only potential problem is if there is code that assumes the fields are "short" (but, judging by the coding style, the programmer knew exactly what they were doing, and I'd guess there are no such dependencies).
(and if that effort isn't worth a few points, I don't know what is! :-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2005 09:33 AM
тАО11-30-2005 09:33 AM
Re: DEC warnings
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2005 09:51 AM
тАО11-30-2005 09:51 AM
Re: DEC warnings
your profile shows, you assigned points to only one out of 15 responses.
> I have assigned points to 1 of 15
> responses to my questions.
Please try to spend time to assign the points.
Archunan
Archie
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2005 10:54 PM
тАО11-30-2005 10:54 PM
Re: DEC warnings
Thanks,
Malleka
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-30-2005 11:00 PM
тАО11-30-2005 11:00 PM
Re: DEC warnings
You seem to have 2 profiles:
This is the one you used to start this thread:
http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=CA1290226&forumId=1
This one, you used in your last reply:
http://forums1.itrc.hp.com/service/forums/publicProfile.do?userId=CA1341125&forumId=1
You have to log in using the CA1230226 profile in order to be able to assign points.
Regards,
Kris (aka Qkcl)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-01-2005 06:35 AM
тАО12-01-2005 06:35 AM
Re: DEC warnings
Not only do you have two IDs, but those also have different names: CA1230226 is "Malleka",
where CA1341125 is "Malleka Ramachandran"
Proost.
Have one on me.
jpe
- « Previous
-
- 1
- 2
- Next »