danmar/cppcheck — pull request #120 by adityanaidu (2012-11-04 00:30:19+00:00)
Title: Check mutex is unlocked before returning from function

It makes sure that if a mutex is locked in a function, it gets unlocked before control returns from that function. See http://lars-lab.jpl.nasa.gov/JPL_Coding_Standard_C.pdf - Rule 9 (semaphores and locking) - ...Unlock operations shall always appear within the body of the same function that performs the matching lock operation.

Currently it does this by checking for pthread mutex methods, pthread_mutex_lock() and pthread_mutex_unlock()

Also see last response from PKEuS and adityanaidu here:danmar/cppcheck#107