diff options
author | Bruno Haible <bruno@clisp.org> | 2001-06-12 12:52:42 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-06-12 12:52:42 +0000 |
commit | 6fedfdc19d7a6db5edbca0e4a731bd9d57c27f42 (patch) | |
tree | e87a29a53ca7349c14becc2841f6e8579e603364 | |
parent | cdfb34a0192a1d24a083416798baac1f077e5088 (diff) | |
download | external_gettext-6fedfdc19d7a6db5edbca0e4a731bd9d57c27f42.zip external_gettext-6fedfdc19d7a6db5edbca0e4a731bd9d57c27f42.tar.gz external_gettext-6fedfdc19d7a6db5edbca0e4a731bd9d57c27f42.tar.bz2 |
Cast xmalloc return value.
-rw-r--r-- | src/ChangeLog | 12 | ||||
-rw-r--r-- | src/message.c | 15 | ||||
-rw-r--r-- | src/msgunfmt.c | 2 | ||||
-rw-r--r-- | src/po.c | 2 | ||||
-rw-r--r-- | src/str-list.c | 4 |
5 files changed, 24 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 1f243a5..0db91f4 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,17 @@ 2001-06-10 Bruno Haible <haible@clisp.cons.org> + * message.c (message_alloc): Cast xmalloc return value. + (message_list_alloc): Likewise. + (message_list_list_alloc): Likewise. + (msgdomain_alloc): Likewise. + (msgdomain_list_alloc): Likewise. + * msgunfmt.c (string32): Likewise. + * po.c (po_alloc): Likewise. + * str-list.c (string_list_concat): Likewise. + (string_list_join): Likewise. + +2001-06-10 Bruno Haible <haible@clisp.cons.org> + * message.h (message_ty): New field 'tmp'. (message_predicate_ty): New type. (message_list_remove_if_not): New declaration. diff --git a/src/message.c b/src/message.c index 79e31f4..ff8d071 100644 --- a/src/message.c +++ b/src/message.c @@ -81,7 +81,7 @@ message_alloc (msgid, msgid_plural, msgstr, msgstr_len, pp) { message_ty *mp; - mp = xmalloc (sizeof (message_ty)); + mp = (message_ty *) xmalloc (sizeof (message_ty)); mp->msgid = msgid; mp->msgid_plural = (msgid_plural != NULL ? xstrdup (msgid_plural) : NULL); mp->msgstr = msgstr; @@ -449,7 +449,7 @@ message_list_alloc () { message_list_ty *mlp; - mlp = xmalloc (sizeof (message_list_ty)); + mlp = (message_list_ty *) xmalloc (sizeof (message_list_ty)); mlp->nitems = 0; mlp->nitems_max = 0; mlp->item = NULL; @@ -608,7 +608,7 @@ message_list_list_alloc () { message_list_list_ty *mllp; - mllp = xmalloc (sizeof (message_list_list_ty)); + mllp = (message_list_list_ty *) xmalloc (sizeof (message_list_list_ty)); mllp->nitems = 0; mllp->nitems_max = 0; mllp->item = NULL; @@ -711,9 +711,9 @@ msgdomain_ty* msgdomain_alloc (domain) const char *domain; { - msgdomain_ty * mdp; + msgdomain_ty *mdp; - mdp = xmalloc (sizeof (msgdomain_ty)); + mdp = (msgdomain_ty *) xmalloc (sizeof (msgdomain_ty)); mdp->domain = domain; mdp->messages = message_list_alloc (); return mdp; @@ -734,12 +734,13 @@ msgdomain_list_alloc () { msgdomain_list_ty *mdlp; - mdlp = xmalloc (sizeof (msgdomain_list_ty)); + mdlp = (msgdomain_list_ty *) xmalloc (sizeof (msgdomain_list_ty)); /* Put the default domain first, so that when we output it, we can omit the 'domain' directive. */ mdlp->nitems = 1; mdlp->nitems_max = 1; - mdlp->item = xmalloc (mdlp->nitems_max * sizeof (msgdomain_ty *)); + mdlp->item = + (msgdomain_ty **) xmalloc (mdlp->nitems_max * sizeof (msgdomain_ty *)); mdlp->item[0] = msgdomain_alloc (MESSAGE_DOMAIN_DEFAULT); return mdlp; } diff --git a/src/msgunfmt.c b/src/msgunfmt.c index 860aeef..cd52c85 100644 --- a/src/msgunfmt.c +++ b/src/msgunfmt.c @@ -347,7 +347,7 @@ string32 (fp, fn, offset, lengthp) /* Allocate memory for the string to be read into. Leave space for the NUL on the end. */ - buffer = xmalloc (length + 1); + buffer = (char *) xmalloc (length + 1); /* Read in the string. Complain if there is an error or it comes up short. Add the NUL ourselves. */ @@ -58,7 +58,7 @@ po_alloc (pomp) { po_ty *pop; - pop = xmalloc (pomp->size); + pop = (po_ty *) xmalloc (pomp->size); pop->method = pomp; if (pomp->constructor) pomp->constructor (pop); diff --git a/src/str-list.c b/src/str-list.c index d2c0726..a8ab49d 100644 --- a/src/str-list.c +++ b/src/str-list.c @@ -145,7 +145,7 @@ string_list_concat (slp) len = 1; for (j = 0; j < slp->nitems; ++j) len += strlen (slp->item[j]); - result = xmalloc (len); + result = (char *) xmalloc (len); pos = 0; for (j = 0; j < slp->nitems; ++j) { @@ -199,7 +199,7 @@ string_list_join (slp) ++len; len += strlen (slp->item[j]); } - result = xmalloc (len); + result = (char *) xmalloc (len); pos = 0; for (j = 0; j < slp->nitems; ++j) { |