> Of On March 22, 2019 16:25, Fabio Aiuto wrote:
> To: Randall S. Becker <rsbec...@nexbridge.com>; git@vger.kernel.org
> Subject: Re: Semantic errors
> 
> Il giorno gio, 21/03/2019 alle 17.03 -0400, Randall S. Becker ha
> scritto:
> > > Of On March 21, 2019 15:32, Fabio Aiuto wrote:
> > > Il giorno gio, 21/03/2019 alle 15.16 -0400, Randall S. Becker ha
> > > scritto:
> > > > On March 21, 2019 15:06, Fabio Aiuto wrote:
> > > > > I'm browsins git code with Eclipse. I'm on a local branch called
> > > > > "studio" based on master (last public commit e902e9b by Junio C
> > > > > Hamano on Monday March 11 2019). I've built everything by
> > > > > changing:
> > > > > CFLAGS = -g -Wall (removing -O2 to have smooth trace in
> > > > > debugging).
> > > > > But the environment detects the following semantic errors (I
> > > > > made no
> > > > > edits!!!):
> > > > > Description   Resource        Path    Location
> > > > > Type
> > > > > Symbol 'GIT_HTML_PATH' could not be resolved  git.c
> > > > > /g
> > > > > it
> > > > > line 154      Semantic Error
> > > > > Symbol 'GIT_MAN_PATH' could not be resolved   git.c
> > > > > /gi
> > > > > t
> > > > > line 158      Semantic Error
> > > > > Symbol 'GIT_INFO_PATH' could not be resolved  git.c
> > > > > /g
> > > > > it
> > > > > line 162      Semantic Error
> > > > > Symbol 'active_cache' could not be resolved   commit.c
> > > > > /git
> > > > > /builtin      line 899        Semantic Error
> > > > > Field 'ce_intent_to_add(active_cache[i])' could not be resolved
> > > > > commit.c      /git/builtin    line 899        Semantic
> > > > > Error
> > > > > Symbol 'active_nr' could not be resolved      commit.c
> > > > > /gi
> > > > > t/bu
> > > > > iltin line 889        Semantic Error
> > > > > Symbol 'active_nr' could not be resolved      commit.c
> > > > > /gi
> > > > > t/bu
> > > > > iltin line 898        Semantic Error
> > > > > Field 'oid' could not be resolved     commit.c        /git/b
> > > > > uilt
> > > > > in
> > > > > line 1654     Semantic Error
> > > > > Symbol 'active_nr' could not be resolved      commit.c
> > > > > /gi
> > > > > t/bu
> > > > > iltin line 901        Semantic Error
> > > > > Symbol 'active_cache_tree' could not be resolved      commit.
> > > > > c
> > > > > /git/builtin  line 1654       Semantic Error
> > > > > Symbol 'active_cache_changed' could not be resolved   comm
> > > > > it.c
> > > > > /git/builtin  line 418        Semantic Error
> > > > > Symbol 'active_cache_tree' could not be resolved      commit.
> > > > > c
> > > > > /git/builtin  line 419        Semantic Error
> > > > > Symbol 'active_nr' could not be resolved      commit.c
> > > > > /gi
> > > > > t/bu
> > > > > iltin line 254        Semantic Error
> > > > > Symbol 'active_cache' could not be resolved   commit.c
> > > > > /git
> > > > > /builtin      line 255        Semantic Error
> > > > >
> > > > > I can debug without problems, but what if I should trece through
> > > > > one of those errors?
> > > > > How can I fix them?
> > > >
> > > > This situation occurs in many projects in ECLIPSE, not only git.
> > > > The
> > > > errors are likely coming from one of the error parsers that you
> > > > have enabled in your workspace. Look in the Project Properties or
> > > > Workspace Preferences under C/C++ Build/Settings in the Error
> > > > Parsers tab for your build configuration. You may have to turn off
> > > > some of those.
> > > > There is also the C/C++ General/Code Analysis Preferences setting
> > > > where you might have to turn off the problematic errors. I have
> > > > found that this is a common situation for code that is imported
> > > > into ECLIPSE from other platforms, where the GNU error and
> > > > analysis tools are overly aggressive by default.
> > > >
> > > > Good luck.
> > > > Randall
> > > >
> > > > -- Brief whoami:
> > > >  NonStop developer since approximately 211288444200000000
> > > >  UNIX developer since approximately 421664400
> > > > -- In my real life, I talk too much.
> > > >
> > > >
> > > >
> > >
> > > Thank you I tried to disable all of them, but they all remain. For
> > > example the variable 'active_nr' is actually never declared. That's
> > > so strange.
> > > Hope to
> > > solve this all soon. I'm freezed...
> >
> > It is very likely in ECLIPSE either in workstation or project settings
> > relating to error parsers (turn everything off). It still may be an
> > error parser issue. One key thing... do not use -Wall.
> > There are also settings about what to do in some error conditions
> > configured in ECLIPSE. -Wall could be probably triggering a response
> > from one of the error parsers. But the Semantic Error type is not
> > normally from the compiler; rather, it is from ECLIPSE CDT pre-
> > scanning the code. Anyway, check out other -W settings to disable all
> > warnings as a start. If you are building in Cygwin or Mingw, you
> > probably can ignore the ECLIPSE errors, especially if git actually
> > built. If you are trying to mix a managed build and a non-managed
> > build in the same project, you are going to be out of luck.
> >
> You mean that if I try to build the project from the shell with a make
> command and then, after some work, inside Eclipse environment I could get
> these semantic errors?

Yes, the semantic scanner runs independently of any build you might do. It is 
designed to detect code defects before compilers are involved as people are 
typing. It runs whenever files are modified.

Reply via email to