Please can you help me with a lint error message?

After calling Lint I got the following DOS-Box error message
c:\tool\lclint32\v2_5q\BIN\lclint -f mkpjlint.tmp xxx.c
LCLint 2.5q --- 26 July 2000

xxx.c: (in function dobj_UpdateVO)
xxx.c(26,8): Passed storage tmp_erg contains 2 undefined fields: a, b
  Storage derivable from a parameter, return value or global is not
defined.
  Use /*@out@*/ to denote passed or returned storage which need not be
defined.
  (-compdef will suppress message)

Finished LCLint checking --- 1 code error found

The file mkpjlint.tmp is:
 +charint
 +partial
 -booltype bool_T
 -macrovarprefixexclude
 -structimponly
 -larchpath c:\tool\lclint32\v2_5q\LIB
 +Ic:\tool\cos_hc12\v4_2t\h6812

The sourcefile xxx.c is:
struct dobj_lsp_S
{
    int a;
    int b;
};

struct dobj_lsp_S var1 = {1,2};

void dobj_UpdateHI(void);
void dobj_UpdateVO(void);
void f2(struct dobj_lsp_S  * x);


void dobj_UpdateHI(void)
{
    struct dobj_lsp_S tmp_erg;
    tmp_erg.a = 1;
    tmp_erg.b = 2;
    f2(&tmp_erg);
}

void dobj_UpdateVO(void)
{
    struct dobj_lsp_S tmp_erg;
    tmp_erg = var1;
    f2(&tmp_erg);
}

void f2(struct dobj_lsp_S  * x)
{
    x->a++;
}

I think Lint does not recognize that "tmp_erg = var1" initialize the
structur!
It would be greate if I get an aswert to my problem.
Thanks in advance, best regard
Klaus Hoffsommer

Reply via email to