Skip to content

Commit c1a8cd3

Browse files
committed
Fix for C90
1 parent 92482b0 commit c1a8cd3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

libcob/strings.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -473,12 +473,12 @@ inspect_common (
473473
static COB_INLINE COB_A_INLINE void
474474
cob_inspect_init_common_mt (struct cob_inspect_state **pst, cob_field *var)
475475
{
476+
struct cob_inspect_state *st;
476477
if (*pst == NULL) {
477478
*pst = malloc (sizeof(struct cob_inspect_state));
478479
(*pst)->mark = NULL;
479480
(*pst)->repdata = NULL;
480481
}
481-
struct cob_inspect_state *st;
482482
st = *pst;
483483

484484
if (COB_FIELD_HAVE_SIGN (var) && !COB_FIELD_SIGN_SEPARATE(var)) {
@@ -503,8 +503,8 @@ cob_inspect_init_common_mt (struct cob_inspect_state **pst, cob_field *var)
503503
void
504504
cob_inspect_init_mt (struct cob_inspect_state **pst, cob_field *var, const cob_u32_t replacing)
505505
{
506-
cob_inspect_init_common_mt (pst, var);
507506
struct cob_inspect_state *st;
507+
cob_inspect_init_common_mt (pst, var);
508508
st = *pst;
509509
st->replacing = replacing;
510510

@@ -545,8 +545,8 @@ cob_inspect_init (cob_field *var, const cob_u32_t replacing)
545545
void
546546
cob_inspect_init_converting_mt (struct cob_inspect_state **pst, cob_field *var)
547547
{
548-
cob_inspect_init_common_mt (pst, var);
549548
struct cob_inspect_state *st;
549+
cob_inspect_init_common_mt (pst, var);
550550
st = *pst;
551551
st->replacing = 0; /* only set for pre 3.2 compat because of cob_inspect_finish */
552552
}
@@ -899,9 +899,9 @@ cob_inspect_finish (void)
899899
void
900900
cob_string_init_mt (struct cob_string_state **pst, cob_field *dst, cob_field *ptr)
901901
{
902+
struct cob_string_state *st;
902903
if (*pst == NULL)
903904
*pst = malloc (sizeof(struct cob_string_state));
904-
struct cob_string_state *st;
905905
st = *pst;
906906

907907
st->dst_copy = *dst;
@@ -1019,11 +1019,11 @@ cob_unstring_init_mt (
10191019
const size_t num_dlm
10201020
)
10211021
{
1022+
struct cob_unstring_state *st;
10221023
if (*pst == NULL) {
10231024
*pst = malloc (sizeof(struct cob_unstring_state));
10241025
(*pst)->dlm_list = NULL;
10251026
}
1026-
struct cob_unstring_state *st;
10271027
st = *pst;
10281028

10291029
st->src_copy = *src;

0 commit comments

Comments
 (0)