gnucap-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnucap-models


From: karl
Subject: Re: gnucap-models
Date: Mon, 4 Apr 2022 13:41:15 +0200 (CEST)

Felix:
> On Sat, Apr 02, 2022 at 08:44:24PM +0200, karl@aspodata.se wrote:
> > https://git.savannah.gnu.org/cgit/gnucap/gnucap-models.git
> > gives a few compiler warnings.
> > 
> > A patch to fix thoose warnings is available at
> >  http://aspodata.se/electronic/gnucap-models.patch
> 
> Thanks for providing a patch. Ask Al for access to git...
> 
> >                 {       T3 = 0.0;
> >                         fprintf(stderr, "Warning: ku0we = %g is negatively 
> > too high. Negative mobility! \n");
> >                 }
> 
> Unsure what this is. Maybe some arcane printf implementation (old
> standard?) takes variable argument values from the stack.

No, this is just some half-thought-trough code, aka. a bug. The result is
undefined.

> Maybe T3 should be second argument to printf, and %g stays there?

We don't know if the author meant T3 or pParam->BSIM4ku0we. Since T3 is 
set tho zero before the fprintf(), it is probably the latter value 
which is wanted. But then, did they want the pParam->BSIM4ku0we value or
pParam->BSIM4ku0we * sceff ?

Since this is an error message, it is sufficient to tell the user that 
something is wrong, hence I suggest we drop the = %g.

And since the README says the imported code is unaltered, the README 
has to be changed as well.

Regards,
/Karl Hammar




reply via email to

[Prev in Thread] Current Thread [Next in Thread]