ebpf-for-windows/ebpfapi
Alan Jowett 0b293ad804
Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749)
* Fix code analysis annotations for _In_ and _In_opt_ parameters,
add const where appropriate or change to _Inout_ where appropriate.

The following regex expressions were used to find the problems:
Find _In_ or _In_opt_ that are not const and are not followed by _Post_invalid_ or _Frees_ptr_ or _Post_ptr_invalid_:
```_In_[ ]+(?!.*(const|_Post_invalid_|_Frees_ptr_|_Post_ptr_invalid_))```
```_In_opt_[ ]+(?!.*(const|_Post_invalid_|_Frees_ptr_|_Post_ptr_invalid_))```

Some of the _In_ and _In_opt_ parameters are not const due to required compatibility with the Windows API.
Pointers to functions are const by definition, so the const qualifier is not required.

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* Fix code analysis failure

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

* PR feedback

Signed-off-by: Alan Jowett <alanjo@microsoft.com>

Signed-off-by: Alan Jowett <alanjo@microsoft.com>
2022-12-15 15:58:33 -08:00
..
CMakeLists.txt Build ELF parse at compile time using EverParse (#1219) 2022-06-22 16:24:02 -06:00
Source.def Include hash of program information in metadata (#1376) 2022-09-20 15:58:38 -07:00
dllmain.cpp Registry changes for program and section data. (#1192) 2022-06-30 16:53:03 -07:00
ebpfapi.vcxproj Visual Studio 2022 porting (#1521) 2022-12-08 20:06:57 -07:00
ebpfapi.vcxproj.filters Use CRT library to map handles to fds (#513) 2021-09-14 09:25:56 -06:00
pch.h Switch to approved license header format (#268) 2021-06-10 12:02:00 -07:00
resource.h Add version info to ebpfcore.sys, ebpfapi.dll, netebpfext.sys, and ebpfsvc.exe (#478) 2021-09-01 17:57:35 -06:00
rpc_client.cpp Fix code analysis annotations for In and In_opt parameters by adding const where appropriate or changing to Inout where appropriate. (#1749) 2022-12-15 15:58:33 -08:00