due to 32/64 and a newer compiler, macos 10.6 finds more warnings.
these are fixes for some of them.
Reviewed-on: http://gerrit.openafs.org/533
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
/* Create and Write the volume header */
makeVolumeHeader(&hostVolumeHeader, dparamsPtr, fragmentNumber);
hostVolumeHeader.contd = ((fragmentNumber == 1) ? 0 : TC_VOLCONTD);
- volumeHeader_hton(&hostVolumeHeader, buffer);
+ volumeHeader_hton(&hostVolumeHeader, (struct volumeHeader *)buffer);
- rc = butm_WriteFileData(tapeInfoPtr, buffer, 1,
+ rc = butm_WriteFileData(tapeInfoPtr, (struct volumeHeader *)buffer, 1,
sizeof(hostVolumeHeader));
if (rc) {
ErrorLog(1, taskId, rc, tapeInfoPtr->error,
/* Create and Write the volume header */
makeVolumeHeader(&hostVolumeHeader, dparamsPtr, 1);
hostVolumeHeader.contd = 0;
- volumeHeader_hton(&hostVolumeHeader, buffer);
+ volumeHeader_hton(&hostVolumeHeader, (struct volumeHeader *)buffer);
- rc = xbsa_WriteObjectData(&butxInfo, buffer, sizeof(struct volumeHeader),
- &bytesWritten);
+ rc = xbsa_WriteObjectData(&butxInfo, (struct volumeHeader *)buffer,
+ sizeof(struct volumeHeader), &bytesWritten);
if (rc != XBSA_SUCCESS) {
ErrorLog(1, taskId, rc, 0,
"Unable to write VolumeHeader data to the server\n");
#ifdef AFS_DARWIN80_ENV
for(j = 0;; j++) {
- fprintf(stream, _darwin_whichstr[j]);
+ fprintf(stream, "%s", _darwin_whichstr[j]);
if (j == 2)
break;
#endif /* AFS_DARWIN80_ENV */
#ifdef AFS_DARWIN80_ENV
for(j = 0;; j++) {
- fprintf(stream, _darwin_whichstr[j]);
+ fprintf(stream, "%s", _darwin_whichstr[j]);
if (j == 2)
break;
#endif /* AFS_DARWIN80_ENV */
#endif
#endif
while (!ok) {
- (void)printf(prompt);
+ (void)printf("%s", prompt);
(void)fflush(stdout);
#ifdef CROSSMSDOS
h19line(s, sizeof(s), 0);
MyBeforeProc(struct cmd_syndesc *as, void *arock)
{
struct ktc_encryptionKey key;
- struct ktc_principal auth_server, auth_token, client;
+ struct ktc_principal auth_server, client;
+ struct ktc_token auth_token;
char realm[MAXKTCREALMLEN];
struct ktc_token token, *pToken;
for (;;) {
char buf[BUFFER_SIZE], *bufp, *sendptr;
struct sockaddr_in from, reply, *to;
- size_t fromlen, sendlen;
+ size_t sendlen;
+ socklen_t fromlen;
bufp = buf + 8;
fromlen = sizeof(from);
return code;
}
- kaux_opendb(lclpath); /* aux database stores failure counters */
+ kaux_opendb((char *)lclpath);/* aux database stores failure counters */
rebuildDatabase = 0; /* only do this during init */
kaprocsInited = 1;
return 0;
if (servers)
code =
ubik_ServerInit(myHost, htons(AFSCONF_KAUTHPORT), serverList,
- dbpath, &KA_dbase);
+ (char *)dbpath, &KA_dbase);
else
code =
ubik_ServerInitByInfo(myHost, htons(AFSCONF_KAUTHPORT), &cellinfo,
- clones, dbpath, &KA_dbase);
+ clones, (char *)dbpath, &KA_dbase);
if (code) {
afs_com_err(whoami, code, "Ubik init failed");
#endif
printf("stackcheck = %u: stack = %u \n", lwp_cpptr->stackcheck,
*(int *)lwp_cpptr->stack);
- printf("topstack = 0x%x: stackptr = 0x%x: stacksize = 0x%x\n",
- (uintptr_t)lwp_cpptr->context.topstack,
- (uintptr_t)lwp_cpptr->stack,
+ printf("topstack = 0x%" AFS_PTR_FMT ": stackptr = 0x%" AFS_PTR_FMT ": stacksize = 0x%x\n",
+ (void *)(uintptr_t)lwp_cpptr->context.topstack,
+ (void *)(uintptr_t)lwp_cpptr->stack,
lwp_cpptr->stacksize);
switch (lwp_overflowAction) {
code =
ubik_ServerInitByInfo(myHost, htons(AFSCONF_PROTPORT), &info, clones,
- pr_dbaseName, &dbase);
+ (char *)pr_dbaseName, &dbase);
if (code) {
afs_com_err(whoami, code, "Ubik init failed");
PT_EXIT(2);
}
#endif /* !AFS_DEMAND_ATTACH_FS */
- printf("\twriter = %u\n", (uintptr_t)v.writer);
+ printf("\twriter = %"AFS_PTR_FMT"\n", (uintptr_t)v.writer);
printf("\tvcp = %p\n", v.vcp);
printf("\thandle = %p\n", v.handle);
}
if ((ti = as->parms[18].items)) { /* -datelogs */
- TimeStampLogFile(AFSDIR_SERVER_SLVGLOG_FILEPATH);
+ TimeStampLogFile((char *)AFSDIR_SERVER_SLVGLOG_FILEPATH);
}
#endif
* multiple salvagers appending to the log.
*/
- CheckLogFile(AFSDIR_SERVER_SLVGLOG_FILEPATH);
+ CheckLogFile((char *)AFSDIR_SERVER_SLVGLOG_FILEPATH);
#ifndef AFS_NT40_ENV
#ifdef AFS_LINUX20_ENV
fcntl(fileno(logFile), F_SETFL, O_APPEND); /* Isn't this redundant? */