-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SAL annotations to Dokan callbacks parameters #1073
Comments
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
Add to all callbacks SAL annotations to indicate the intent of pointer paramters.
Description
First of all, i'm not a c++ programmer, so I don't know if this makes sense or is even feasible.
This question arose to me during the migration fom Dokany 1.x to 2.x. Newer functions like DokanCloseHandle(...) are using SAL annotations to indicate the usage intent of function parameters and so, reduce misuse of them.
From my point of view, such annotations would be also benefical for the dokan callbacks, since it is not always clear, which parameter struct can and should be altered. Especially this holds for the DokanFileInfo struct, since this one cannot be looked up in any Windows documentation.
As an example, in the sample mirrorfs, in the dokanFileInfo struct the directory attribute is set:
dokany/samples/dokan_mirror/mirror.c
Lines 274 to 284 in 1ffacd4
I would assume the kernel driver is responsible for setting such attributes correctly, but it seems like we have to deal with it.
The text was updated successfully, but these errors were encountered: