Modify

Opened 3 months ago

Closed 3 months ago

Last modified 3 months ago

#3777 closed Bug (No Bug)

Au3Check Custom Includes

Reported by: seadoggie01 Owned by:
Milestone: Component: Au3Check
Version: 3.3.14.5 Severity: None
Keywords: Au3Check Cc:

Description

Au3Check cares about what symbol is used in custom includes to #include files.

; Main.au3
#include <Test.au3>
#include <Test2.au3>
; Test.au3
#include "Test2.au3"
; Test2.au3
Global $__g_bGarbage

Attachments (0)

Change History (6)

comment:1 Changed 3 months ago by seadoggie01

This only seems to matter in custom includes and it only matters if different symbols are used to wrap the file name. (I posted this bug but missed putting my username in)

comment:2 Changed 3 months ago by Jpm

  • Component changed from AutoIt to Au3Check
  • Reporter changed from anonymous to seadoggie01

comment:3 Changed 3 months ago by anonymous

I donn't understand as the warning are clear to me

>Running AU3Check (3.3.15.3)  params:-q -d -w 1 -w 2 -w 3 -w- 4 -w 5 -w 6 -w 7  from:C:\Program Files (x86)\AutoIt3\Beta  input:F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Main.au3
"F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Main.au3"(3,10) : warning: already included file: F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Test2.au3
#include <Test2.au3>
~~~~~~~~~^
"F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Test2.au3"(2,21) : warning: $__g_bGarbage already declared/assigned
Global $__g_bGarbage
~~~~~~~~~~~~~~~~~~~~^
F:\_NoSave\_Data\Jpm\Bureau\_TBD\_AutoIt\_Tickets\_ToBeChecked\#3777 Au3check includes\Main.au3 - 0 error(s), 2 warning(s)
->14:05:38 AU3Check ended. Press F4 to jump to next error.rc:1

comment:4 follow-up: Changed 3 months ago by seadoggie01

The warnings are clear, but the file should only be included once (and is if it's compiled). A better example would've been to use a function in Test2.au3. If you run Au3Check it says the function will be double-declared. If you skip Au3Check, AutoIt doesn't report an error on a double-declared function.

comment:5 Changed 3 months ago by Jos

  • Resolution set to No Bug
  • Status changed from new to closed

Why once as you don't have that specified?
Lets have this discussion on the forum first with some proper examples before declaring it a bug.

So closing the discussion here for the moment.

Jos

comment:6 in reply to: ↑ 4 Changed 3 months ago by mLipok

Replying to seadoggie01:

The warnings are clear, but the file should only be included once (and is if it's compiled).

did you try to use:

#include-once

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.