Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • BIND BIND
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 609
    • Issues 609
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 87
    • Merge requests 87
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISC Open Source ProjectsISC Open Source Projects
  • BINDBIND
  • Issues
  • #927
Closed
Open
Issue created Mar 07, 2019 by Mark Andrews@markaDeveloper

teach clang that _fail() does not return.

cmocka's fail_msg() (_fail() in macro) cannot return. Clang's static analysis has a false null pointer dereference error because it does not know this.

	if (result != test->result) {
7
←
Assuming the condition is true	
→
8
←
Taking true branch	
→
102			fail_msg("# test \"%s\" on line %d: "
103				 "expected result %d (%s), got %d (%s)",
104				 test->id.description, test->id.lineno,
105				 test->result, isc_result_totext(test->result),
106				 result, isc_result_totext(result));
107		}
108	 
109		/*
110		 * Check output string if return value indicates success.
111		 */
112		if (result == ISC_R_SUCCESS && strcmp(*target, test->output) != 0) {
9
←
Assuming 'result' is equal to 0	
→
10
←
Null pointer argument in call to string comparison function
113			fail_msg("# test \"%s\" on line %d: "
114				 "expected output \"%s\", got \"%s\"",
115				 test->id.description, test->id.lineno,
116				 test->output, *target);
117		}
Assignee
Assign to
Time tracking