unreferenced formal parameter in credit code

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

unreferenced formal parameter in credit code

Ferdinando M. Ametrano-3
Hi all

as you probably guessed I'm doing some lint activity for 1.0 release,
so expect some more "unreferenced formal parameters" message from me.

Feel free to trash all of them ;-) but if you are the author or you
have some familiarity with the code referenced please consider helping

warning C4100: 'i' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\onefactorcopula.hpp 264
warning C4100: 'stepSize' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp 84
warning C4100: 'floatDayCount' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp 192
warning C4100: 'floatConvention' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp 191
warning C4100: 'date' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskybond.cpp 76
warning C4100: 'd' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp 164
warning C4100: 'buckets' : unreferenced formal
parameter c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\distribution.cpp 280

For unreferenced formal parameter there are 3 possible alternatives:

1) keep the parameter, just remove its name. This might be the case if
you're inheriting the signature, but the parameter doesn't make sense
in your implementation
2) use the parameter. Not using it was a genuine bug
3) remove the parameter as it is not needed

ciao -- Nando

RSS feed: http://www.google.com/reader/shared/ferdinando.ametrano

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: unreferenced formal parameter in credit code

Roland Lichters-2
warning C4100: 'i' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\onefactorcopula.hpp  264
I'd like to keep the parameter to allow varying grid size for the copula integration in the future.
 
warning C4100: 'stepSize' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp      84
Removed the parameter.
 
warning C4100: 'floatDayCount' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp   192
warning C4100: 'floatConvention' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp   191
Fixed two bugs here, now using the parameters, thanks!
 
warning C4100: 'date' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskybond.cpp        76
Removed the parameter.
 
warning C4100: 'd' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp      164
Kept the parameter (due to inheritance)
 
warning C4100: 'buckets' : unreferenced formal
parameter       c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\distribution.cpp     280
Removed the parameter. 

I have committed the changes to the trunk.

Regards,
Roland
 

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev
Reply | Threaded
Open this post in threaded view
|

Re: unreferenced formal parameter in credit code

Ferdinando M. Ametrano-3
thank you Roland.
I've muted those two parameters you wanted/had to keep.

ciao -- Nando

On Wed, Dec 2, 2009 at 5:21 PM, Roland Lichters
<[hidden email]> wrote:

>> warning C4100: 'i' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\onefactorcopula.hpp
>>  264
>
> I'd like to keep the parameter to allow varying grid size for the copula
> integration in the future.
>
>>
>> warning C4100: 'stepSize' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp
>>      84
>
> Removed the parameter.
>
>>
>> warning C4100: 'floatDayCount' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp
>>   192
>> warning C4100: 'floatConvention' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskyassetswap.cpp
>>   191
>
> Fixed two bugs here, now using the parameters, thanks!
>
>>
>> warning C4100: 'date' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\riskybond.cpp
>>    76
>
> Removed the parameter.
>
>>
>> warning C4100: 'd' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\syntheticcdoengines.hpp
>>      164
>
> Kept the parameter (due to inheritance)
>
>>
>> warning C4100: 'buckets' : unreferenced formal
>> parameter
>> c:\Projects\QuantLib\trunk\QuantLib\ql\experimental\credit\distribution.cpp
>>     280
>
> Removed the parameter.
> I have committed the changes to the trunk.
> Regards,
> Roland
>

------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev