Home

Unused global variables/constants should be removed

Rule description

  • Unused global variables/constants should be removed

 

Non-compliant Code Example

forward
global type veinet from inet
end type
end forward

global type veinet from inet
end type
global veinet veinet //Non compliant code (Unused global variable)

forward prototypes
global function string callINETPOST (integer id)
global function string callINETGET (integer id)
global function string callINETHyperlinkToURL (integer id)
end prototypes

global function string callINETPOST (integer id)

Blob lblb_args
String ls_headers
String ls_url
Long ll_length
veinternetresult iir_msgbox
iir_msgbox = CREATE veinternetresult
ls_url = "https://www.visual-expert.com/"
ls_url += "EN/powerbuilder-code-pb/"
ls_url += "function-source-analysis-documentation-impact.html?"
lblb_args = blob("")
ll_length = Len(lblb_args)
ls_headers = "Content-Length: " &
   +String(ll_length) + "~n~n"
PostURL &
   (ls_url, lblb_args, ls_headers, 8080, iir_msgbox)

Return ""
end function
Visual Expert 2020
 VEPBRULE58