diff --git a/src/jrd/gds.cpp b/src/jrd/gds.cpp index 41ce1b998a..a25c4b7e59 100644 --- a/src/jrd/gds.cpp +++ b/src/jrd/gds.cpp @@ -1481,7 +1481,7 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle, const ULONG code = MSG_NUMBER(facility, number); const msgnod* const end = - (MSGNOD) ((SCHAR *) messageL->msg_bucket + messageL->msg_bucket_size); + (msgnod*) ((char*) messageL->msg_bucket + messageL->msg_bucket_size); ULONG position = messageL->msg_top_tree; status = 0; @@ -1494,7 +1494,7 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle, else if (n == messageL->msg_levels) break; else { - for (const msgnod* node = (MSGNOD) messageL->msg_bucket; !status; node++) { + for (const msgnod* node = (msgnod*) messageL->msg_bucket; !status; node++) { if (node >= end) { status = -8; break; @@ -1509,10 +1509,10 @@ SSHORT API_ROUTINE gds__msg_lookup(void* handle, if (!status) { /* Search the leaf */ - for (const msgrec* leaf = (MSGREC) messageL->msg_bucket; !status; + for (const msgrec* leaf = (msgrec*) messageL->msg_bucket; !status; leaf = NEXT_LEAF(leaf)) { - if (leaf >= (MSGREC) end || leaf->msgrec_code > code) { + if (leaf >= (const msgrec*) end || leaf->msgrec_code > code) { status = -1; break; } diff --git a/src/jrd/msg.h b/src/jrd/msg.h index 9a0aabb465..b582ce8e8d 100644 --- a/src/jrd/msg.h +++ b/src/jrd/msg.h @@ -21,7 +21,7 @@ * Contributor(s): ______________________________________. */ /* -$Id: msg.h,v 1.6 2004-05-24 17:28:33 brodsom Exp $ +$Id: msg.h,v 1.7 2004-10-04 04:59:43 robocop Exp $ */ #ifndef JRD_MSG_H @@ -52,8 +52,6 @@ struct msgnod { ULONG msgnod_seek; /* Offset of next bucket or message */ }; -typedef msgnod *MSGNOD; - /* Leaf node */ struct msgrec { @@ -64,7 +62,6 @@ struct msgrec { }; typedef msgrec *MSGREC; - #define NEXT_LEAF(leaf) (MSGREC) \ ((SCHAR*) leaf + FB_ALIGN(OFFSETA (MSGREC, msgrec_text) + leaf->msgrec_length, sizeof (SLONG))) diff --git a/src/msgs/build_file.epp b/src/msgs/build_file.epp index 0738398c6c..bed73fd86d 100644 --- a/src/msgs/build_file.epp +++ b/src/msgs/build_file.epp @@ -166,7 +166,7 @@ int CLIB_ROUTINE main( int argc, char** argv) /* make sure the path name ends in a '/' */ if (pathname) { - size_t len = strlen(pathname); + const size_t len = strlen(pathname); //fb_assert(len + 1 < MAXPATHLEN); if (pathname[len - 1] != path_separator) { pathname[len] = path_separator; @@ -281,7 +281,7 @@ static USHORT do_msgs( const TEXT* filename, const TEXT* locale, bool sw_warning // Divy up memory among various buffers // Memory leaking until the program finishes? - msgrec* leaf_node = (MSGREC) gds__alloc((SLONG) MSG_BUCKET); + msgrec* leaf_node = (msgrec*) gds__alloc((SLONG) MSG_BUCKET); msgrec* const leaf = leaf_node; const TEXT* const end_leaf = (TEXT*) leaf + MSG_BUCKET;