Skip to content

Instantly share code, notes, and snippets.

@joubertnel
Created February 19, 2019 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joubertnel/1f0233cb0a290950f2d4b8fafcd2979c to your computer and use it in GitHub Desktop.
Save joubertnel/1f0233cb0a290950f2d4b8fafcd2979c to your computer and use it in GitHub Desktop.
darwin-nat.c variable shadowing
darwin-nat.c: In function 'int darwin_decode_exception_message(mach_msg_header_t*, inferior**, darwin_thread_t**)':
darwin-nat.c:690:21: error: declaration of 'kret' shadows a previous local [-Werror=shadow=compatible-local]
kern_return_t kret;
^~~~
darwin-nat.c:626:17: note: shadowed declaration is here
kern_return_t kret;
^~~~
darwin-nat.c: In function 'ptid_t darwin_decode_message(mach_msg_header_t*, darwin_thread_t**, inferior**, target_waitstatus*)':
darwin-nat.c:1128:14: error: declaration of 'res' shadows a previous local [-Werror=shadow=compatible-local]
pid_t res;
^~~
darwin-nat.c:1101:11: note: shadowed declaration is here
int res;
^~~
darwin-nat.c: In member function 'virtual void darwin_nat_target::kill()':
darwin-nat.c:1562:24: error: declaration of 'priv' shadows a previous local [-Werror=shadow=compatible-local]
darwin_inferior *priv = get_darwin_inferior (inf);
^~~~
darwin-nat.c:1528:20: note: shadowed declaration is here
darwin_inferior *priv = get_darwin_inferior (inf);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment