Recent

Author Topic: Unused parameters  (Read 9319 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 14371
  • Sensorship about opinions does not belong here.
Re: Unused parameters
« Reply #15 on: June 22, 2017, 04:00:12 pm »
filter those lines when a {%H-} is at the place, that is handled by the compiler
No THAT {%H-} is NOT handled by the compiler... That is an IDE macro and handled by the IDE.
I explained the correct operations in the wiki. And I updated the missing information.

http://wiki.freepascal.org/Turn_warnings_and_hints_on_or_off#Local_IDE_option
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Unused parameters
« Reply #16 on: June 22, 2017, 11:59:12 pm »
@Thaddy: Hey keep cool, that was exactly what i said: {%H-} is handled by the IDE so all you need to to is write a filter and do it like the IDE does ! So it will be compatible with the IDE. 
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

jc99

  • Hero Member
  • *****
  • Posts: 553
    • My private Site
Re: Unused parameters
« Reply #17 on: June 23, 2017, 12:06:38 am »
filter those lines when a {%H-} is at the place, that is handled by the compiler as a COMMENT
If you quote me, please do it right !!!
OS: Win XP x64, Win 7, Win 7 x64, Win 10, Win 10 x64, Suse Linux 13.2
Laz: 1.4 - 1.8.4, 2.0
https://github.com/joecare99/public
'~|    /''
,_|oe \_,are
If you want to do something for the environment: Twitter: #reduceCO2 or
https://www.betterplace.me/klimawandel-stoppen-co-ueber-preis-reduzieren

runewalsh

  • Jr. Member
  • **
  • Posts: 82
Re: Unused parameters
« Reply #18 on: May 11, 2018, 12:12:12 am »
I personally use
Code: Pascal  [Select][+][-]
  1. procedure SomeProc(unused: pointer);
  2. begin
  3.         Assert(@unused = @unused); // or @unused >= nil, or unused = unused.
  4. end;
For some reason it suppresses hint about mentioned parameter even with disabled assertions.
« Last Edit: May 11, 2018, 12:19:31 am by runewalsh »

jamie

  • Hero Member
  • *****
  • Posts: 6130
Re: Unused parameters
« Reply #19 on: May 11, 2018, 12:48:36 am »
Procedure SomeProc({%H-} unused:Pointer);
The only true wisdom is knowing you know nothing

ASerge

  • Hero Member
  • *****
  • Posts: 2241

 

TinyPortal © 2005-2018