Can't Resolve Variable 'CODE'

Answered

I have a project that compiles and runs and uses an enum in a struct like this:

struct {
void (*action) (const char *, minipro_handle_t *handle, device_t *device);
char *filename;
device_t *device;
enum { UNSPECIFIED = 0, CODE, DATA, CONFIG } page;
int no_erase;
int no_protect_off;
int no_protect_on;
int size_error;
int size_nowarn;
int no_verify;
int icsp;
int idcheck_skip;
int idcheck_continue;
} cmdopts;

However, the editor flags lines like the following as an error even though the code compiles and runs...

if(!strcmp(optarg, "code"))
cmdopts.page = CODE;

Wayne

0
1 comment

Hi! We have the related issue in our tracker: https://youtrack.jetbrains.com/issue/CPP-6286. Feel free to comment or upvote. Follow it to get updates.

0

Please sign in to leave a comment.