kproc | Processing with Kotlin
kandi X-RAY | kproc Summary
kandi X-RAY | kproc Summary
Processing with Kotlin
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of kproc
kproc Key Features
kproc Examples and Code Snippets
Community Discussions
Trending Discussions on kproc
QUESTION
I am working in the kernel space of a project (building in ARM64), and am unable to disable specific warnings for my project. The warning is being treated as an error and will not allow me to compile my project, so you can imagine it is very annoying.
The warning is Error code C4244: '=' conversion from 'ULONG_PTR' to 'ULONG', possible loss of data. I have tried using the #pragma disable warning 4244 however that does not work, I have turned off the "treat warnings as errors" setting in my project, I have "turned off all warnings" in the warnings level project setting.
I seem to have tried everything under the sun and yet I still cannot compile, any solutions? I will post the code throwing the error below so someone might be able to fix, however turning the warning off is just as good :)
...ANSWER
Answered 2020-Dec-18 at 08:31Based on the comments in your last question, the warning should appear at the location where the get_process_id_by_name
function is called, not inside the get_process_id_by_name
function. Because now there is no conversion of ULONG_PTR
to ULONG
inside the function.
This is the documentation for #pragma warning
.
And here is the fixed code:
QUESTION
I am getting the warning (treated as error):
Type Cast Pointer Truncation from HANDLE to ULONG
When I try to compile, I understand that the type has a different length as I am compiling ARM64 rather than ARM, therefore I need to change the type or static_cast
it, however I receive errors such as "expected (" when changing the line to something like this:
ANSWER
Answered 2020-Dec-18 at 02:40Use ULONG_PTR instead of ULONG:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kproc
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page