GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Help with compiler errors
Operating System - HP-UX
1843929
Members
1487
Online
110226
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-07-2004 09:30 AM
01-07-2004 09:30 AM
Help with compiler errors
Hi all,
I've done searches on these, but there doesn't appear any direct explanation of what causes these. I'm willing to do my homework, but not sure where to start. Is there a place one can look up these errors and get an explanation of what causes them? Either way, I'm getting:
Reference through a non-pointer (for both lines)
and
Expression in if must be scalar (for the 1st line)
for the following lines in my .c file:
if (acct->uflg->fg_expire)
expire_time = acct->ufld->fd_expire;
I'm happy to provide more complete details if necessary, but thought we'd start here.
Thanks
Russ
I've done searches on these, but there doesn't appear any direct explanation of what causes these. I'm willing to do my homework, but not sure where to start. Is there a place one can look up these errors and get an explanation of what causes them? Either way, I'm getting:
Reference through a non-pointer (for both lines)
and
Expression in if must be scalar (for the 1st line)
for the following lines in my .c file:
if (acct->uflg->fg_expire)
expire_time = acct->ufld->fd_expire;
I'm happy to provide more complete details if necessary, but thought we'd start here.
Thanks
Russ
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2004 10:55 AM
01-07-2004 10:55 AM
Re: Help with compiler errors
Well, I found help from a knowledgeable c programmer on staff here at work, and though he wasn't familiar with HPUX, he understood the errors and helped me work through this. Therefore, I'll say we can "close" this, and when I have time, I'll add a line expaining the full solution with before and after versions of the files. One thing I didn't explain was that this is a port from Tru64 that I'm attempting. The file works there great but I needed this on HPUX. For anyone who cares, it is a file that produces a listing of users showing when their passwords expire. We use this as part of a Audit mandated requirement to notify users that their password will expire and when they have not logged in for more than 50 days. When I have this all settled, I'll post the files.
Thanks anyway,
Russ
Thanks anyway,
Russ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2006 06:09 PM
11-05-2006 06:09 PM
Re: Help with compiler errors
The following would correctly reference pointer to struct containing pointer to other structs:
...
if (acct->uflg->fg_expire)
expire_time = acct->ufld->fd_expire;
...
In actual fact, documentation states that pr_passwd wraps nested structs rather than reference them thru pointer:
struct pr_passwd {
struct pr_field ufld; /* user specific fields */
struct pr_flag uflg; /* user specific flags */
struct pr_field sfld; /* system wide fields */
struct pr_flag sflg; /* system wide flags */
};
So the way to reference it is:
...
if (acct->uflg.fg_expire)
expire_time = acct->ufld.fd_expire;
...
I think there is a coding example floating on the web (variable names match) that is wrong in this sense.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP