johnsonjh / cku

[wip]
Other
1 stars 0 forks source link

AIX 7.3 XLC 16: "ckufio.c", line 1208.14: 1506-280 (W) Function argument assignment between types "int*" and "long long*" is not allowed. #4

Open johnsonjh opened 2 years ago

johnsonjh commented 2 years ago
"ckufio.c", line 1208.14: 1506-280
(W) Function argument assignment between types "int*" and "long long*" is not allowed.

Code in question:

time(&ut.ut_time);
     ^

This is on a default 32-bit AIX build - but the surrounding section is relevant.

#ifdef HAVEUTMPX
        time(&ut.ut_tv.tv_sec);
#else
#ifdef LINUX
/* In light of the following comment perhaps the previous line should */
/* be "#ifndef COMMENT". */
        {
            /*
             * On 64-bit platforms sizeof(time_t) and sizeof(ut.ut_time)
             * are not the same and attempt to use an address of
             * ut.ut_time as an argument to time() call may cause
             * "unaligned access" trap.
             */
            time_t zz;
            time(&zz);
            ut.ut_time = zz;
        }
#else
#ifdef CK_64BIT
        {
        /* Now (Jan 2006) we can do this for any 64-bit build */
            time_t zz;
            time(&zz);
            ut.ut_time = zz;
        }
#else
        time(&ut.ut_time);
#endif  /* CK_64BIT */
#endif /* LINUX */
#endif /* HAVEUTMPX */