Opened 11 years ago
Closed 11 years ago
#1355 closed Enhancement (fixed)
the Netbeans IDE is confused about the config variable in feeder.cpp
Reported by: | Christian Beer | Owned by: | davea |
---|---|---|---|
Priority: | Minor | Milestone: | Undetermined |
Component: | Server - Scheduler | Version: | |
Keywords: | Cc: |
Description
feeder.cpp is just an example I always stumple upon, I think that all server components have this problem.
Because there are two global variables called config. One defined in log_flags.cpp using the struct CONFIG from cc_config.h and one defined in sched_config.h using the struct SCHED_CONFIG.
I get a lot of syntax errors shown in Netbeans because the wrong struct is used in the wrong context (e.g. Go to Declaration/Definition? from server context always brings me to cc_config.h). Renaming the variable in server context to srvconfig is clearing this up.
May guess is that the compiler has no issues with this but other code analysis tools have. I would like to get rid of this ambiguity sooner than later. This would also improve the readability of the code in general not only when using an IDE.
I'm willing to provide patches.
I changed config to cc_config in the client code (fewer lines to change).