Advertisement
Guest User

Code Analysis done on ERAM via VS 2017

a guest
Dec 5th, 2018
454
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.51 KB | None | 0 0
  1. ------ Rebuild All started: Project: eram, Configuration: Debug x64 ------
  2. Building 'eram' with toolset 'WindowsKernelModeDriver10.0' and the 'Desktop' target platform.
  3. eram.c
  4. c:\eram_vs\eram.h(278): warning C28251: Inconsistent annotation for 'ZwCreateSection': this instance has no annotations. See c:\program files (x86)\windows kits\10\include\10.0.17763.0\km\wdm.h(39524).
  5. c:\eram_vs\eram.c(144): warning C28170: The function 'EramCreateClose' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  6. c:\eram_vs\eram.c(168): warning C28170: The function 'EramDeviceControl' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  7. c:\eram_vs\eram.c(235): warning C28170: The function 'EramDeviceControlGeometry' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  8. c:\eram_vs\eram.c(271): warning C28170: The function 'EramDeviceControlGetPartInfo' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  9. c:\eram_vs\eram.c(310): warning C28170: The function 'EramDeviceControlSetPartInfo' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  10. c:\eram_vs\eram.c(341): warning C28170: The function 'EramDeviceControlVerify' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  11. c:\eram_vs\eram.c(392): warning C28170: The function 'EramDeviceControlDiskCheckVerify' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  12. c:\eram_vs\eram.c(428): warning C28170: The function 'EramDeviceControlGetLengthInfo' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  13. c:\eram_vs\eram.c(460): warning C28170: The function 'EramReadWrite' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  14. c:\eram_vs\eram.c(553): warning C28170: The function 'EramUnloadDriver' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  15. c:\eram_vs\eram.c(600): warning C28164: The argument 'pEramExt->pThreadObject' is being passed to a function that expects a pointer to an object (not a pointer to a pointer): The function takes a PVOID in this position. Usually, this indicates that &pXXX was used when pXXX is required.
  16. c:\eram_vs\eram.c(579): warning C28170: The function 'EramUnloadDevice' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  17. c:\eram_vs\eram.c(596): warning C28160: Error annotation: Caution: 'Wait' argument does not provide any synchronization guarantees, only a hint to the system that the thread will immediately issue a wait operation.
  18. c:\eram_vs\eram.c(647): warning C28170: The function 'ResourceRelease' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  19. c:\eram_vs\eram.c(691): warning C28159: Consider using 'IoReportResourceForDetection if needed' instead of 'IoReportResourceUsage'. Reason: Obsolete
  20. c:\eram_vs\eram.c(677): warning C28170: The function 'ReleaseMemResource' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  21. c:\eram_vs\eram.c(707): warning C28170: The function 'EramReportEvent' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  22. c:\eram_vs\eram.c(722): warning C6014: Leaking memory '&UniStr'.
  23. c:\eram_vs\eram.c(743): warning C28170: The function 'EramReportEventW' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  24. c:\eram_vs\eram.c(804): warning C28170: The function 'ReadPool' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  25. c:\eram_vs\eram.c(830): warning C28170: The function 'WritePool' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  26. c:\eram_vs\eram.c(856): warning C28170: The function 'ExtRead1' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  27. c:\eram_vs\eram.c(919): warning C28170: The function 'ExtWrite1' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  28. c:\eram_vs\eram.c(981): warning C28170: The function 'ExtNext1' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  29. c:\eram_vs\eram.c(1018): warning C28170: The function 'ExtMap' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  30. c:\eram_vs\eram.c(1061): warning C28170: The function 'ExtUnmap' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  31. c:\eram_vs\eram.c(1086): warning C28170: The function 'ExtFilePendingRw' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  32. c:\eram_vs\eram.c(1126): warning C28170: The function 'EramRwThread' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  33. c:\eram_vs\eram.c(1203): warning C28170: The function 'EramRwThreadIrp' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  34. c:\eram_vs\eram.c(1274): warning C28170: The function 'ExtFileRead1' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  35. c:\eram_vs\eram.c(1323): warning C28170: The function 'ExtFileWrite1' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  36. c:\eram_vs\eram.c(1371): warning C28170: The function 'ExtFileNext1' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  37. c:\eram_vs\eram.c(1410): warning C28170: The function 'ExtFileMap' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  38. c:\eram_vs\eram.c(1455): warning C28170: The function 'ExtFileUnmap' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  39. c:\eram_vs\eram.c(1504): warning C28164: The argument 'pEramExt->pThreadObject' is being passed to a function that expects a pointer to an object (not a pointer to a pointer): The function takes a PVOID in this position. Usually, this indicates that &pXXX was used when pXXX is required.
  40. c:\eram_vs\eram.c(1486): warning C28170: The function 'EramShutdown' has been declared to be in a paged segment, but neither PAGED_CODE nor PAGED_CODE_LOCKED was found: This warning is not emitted for functions that are __forceinline.
  41. c:\eram_vs\eram.c(1501): warning C28160: Error annotation: Caution: 'Wait' argument does not provide any synchronization guarantees, only a hint to the system that the thread will immediately issue a wait operation.
  42. c:\eram_vs\eram.c(1543): warning C28101: This function appears to be an unannotated DriverEntry function: DriverEntry functions should be declared using the DRIVER_INITIALIZE function typedef.
  43. c:\eram_vs\eram.c(1558): warning C28159: Consider using 'ExAllocatePoolWithTag' instead of 'ExAllocatePool'. Reason: No tag interferes with debugging.
  44. c:\eram_vs\eram.c(1585): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_DISPATCH' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramCreateClose' may fix this. <function class name> should be one of the function classes listed above.
  45. c:\eram_vs\eram.c(1585): warning C28169: The dispatch function 'EramCreateClose' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
  46. c:\eram_vs\eram.c(1586): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_DISPATCH' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramCreateClose' may fix this. <function class name> should be one of the function classes listed above.
  47. c:\eram_vs\eram.c(1586): warning C28169: The dispatch function 'EramCreateClose' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
  48. c:\eram_vs\eram.c(1587): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_DISPATCH' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramReadWrite' may fix this. <function class name> should be one of the function classes listed above.
  49. c:\eram_vs\eram.c(1587): warning C28169: The dispatch function 'EramReadWrite' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
  50. c:\eram_vs\eram.c(1588): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_DISPATCH' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramReadWrite' may fix this. <function class name> should be one of the function classes listed above.
  51. c:\eram_vs\eram.c(1588): warning C28169: The dispatch function 'EramReadWrite' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
  52. c:\eram_vs\eram.c(1589): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_DISPATCH' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramDeviceControl' may fix this. <function class name> should be one of the function classes listed above.
  53. c:\eram_vs\eram.c(1589): warning C28169: The dispatch function 'EramDeviceControl' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
  54. c:\eram_vs\eram.c(1590): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_DISPATCH' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramShutdown' may fix this. <function class name> should be one of the function classes listed above.
  55. c:\eram_vs\eram.c(1590): warning C28169: The dispatch function 'EramShutdown' does not have any _Dispatch_type_ annotations: This can be corrected by adding appropriate _Dispatch_type_ annotations to the function. Unnecessary casts can cause this warning.
  56. c:\eram_vs\eram.c(1592): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'DRIVER_UNLOAD' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> EramUnloadDriver' may fix this. <function class name> should be one of the function classes listed above.
  57. c:\eram_vs\eram.c(1558): warning C28751: Banned usage of ExAllocatePool and its variants: ExAllocatePool is a banned API for improved error handling purposes.
  58. c:\eram_vs\eram.c(1739): warning C28159: Consider using 'ExAllocatePoolWithTag' instead of 'ExAllocatePool'. Reason: No tag interferes with debugging.
  59. c:\eram_vs\eram.c(1667): warning C28197: Possibly leaking memory 'pDevObj'.
  60. c:\eram_vs\eram.c(1739): warning C28197: Possibly leaking memory 'pEramExt->Win32Name.Buffer'.
  61. c:\eram_vs\eram.c(1673): warning C28719: Banned API Usage: sprintf is a Banned API as listed in dontuse.h for security purposes.
  62. c:\eram_vs\eram.c(1675): warning C28719: Banned API Usage: sprintf is a Banned API as listed in dontuse.h for security purposes.
  63. c:\eram_vs\eram.c(1739): warning C28751: Banned usage of ExAllocatePool and its variants: ExAllocatePool is a banned API for improved error handling purposes.
  64. c:\eram_vs\eram.c(1872): warning C28023: The function being assigned or passed should have a _Function_class_ annotation for at least one of the class(es) in: 'KSTART_ROUTINE' Frequently, when only one function class is in use, this is caused by not declaring a callback to be of the appropriate type. Preceding the first declaration of the function by '<function class name> <FunctionName>' may fix this. <function class name> should be one of the function classes listed above.
  65. c:\eram_vs\eram.c(1923): warning C28159: Consider using 'ExAllocatePoolWithTag' instead of 'ExAllocatePool'. Reason: No tag interferes with debugging.
  66. c:\eram_vs\eram.c(1923): warning C28751: Banned usage of ExAllocatePool and its variants: ExAllocatePool is a banned API for improved error handling purposes.
  67. c:\eram_vs\eram.c(1960): warning C28159: Consider using 'ExAllocatePoolWithTag' instead of 'ExAllocatePool'. Reason: No tag interferes with debugging.
  68. c:\eram_vs\eram.c(1960): warning C28160: Error annotation: Must succeed pool allocations are forbidden. Allocation failures cause a system crash.
  69. c:\eram_vs\eram.c(1960): warning C28751: Banned usage of ExAllocatePool and its variants: ExAllocatePool is a banned API for improved error handling purposes.
  70. c:\eram_vs\eram.c(2024): warning C6031: Return value ignored: 'MmLockPagableDataSection'.
  71. c:\eram_vs\eram.c(2129): warning C28159: Consider using 'ExAllocatePoolWithTag' instead of 'ExAllocatePool'. Reason: No tag interferes with debugging.
  72. c:\eram_vs\eram.c(2129): warning C28751: Banned usage of ExAllocatePool and its variants: ExAllocatePool is a banned API for improved error handling purposes.
  73. c:\eram_vs\eram.c(2411): warning C6014: Leaking memory '&AnsiVol'.
  74. c:\eram_vs\eram.c(2998): warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
  75. c:\eram_vs\eram.c(3010): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
  76. c:\eram_vs\eram.c(3012): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
  77. c:\eram_vs\eram.c(3016): warning C26451: Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2).
  78. c:\eram_vs\eram.c(3171): warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value.
  79. c:\eram_vs\eram.c(3175): warning C6297: Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value.
  80. c:\eram_vs\eram.c(3152): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
  81. c:\eram_vs\eram.c(3162): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
  82. c:\eram_vs\eram.c(3171): warning C26451: Arithmetic overflow: Using operator '<<' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '<<' to avoid overflow (io.2).
  83. c:\eram_vs\eram.c(3175): warning C26451: Arithmetic overflow: Using operator '<<' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '<<' to avoid overflow (io.2).
  84. c:\eram_vs\eram.c(3209): warning C28159: Consider using 'ExAllocatePoolWithTag' instead of 'ExAllocatePool'. Reason: No tag interferes with debugging.
  85. c:\eram_vs\eram.c(3262): warning C6014: Leaking memory 'pwStr'.
  86. c:\eram_vs\eram.c(3225): warning C6387: '_Param_(2)' could be '0': this does not adhere to the specification for the function 'RtlQueryRegistryValues'.
  87. c:\eram_vs\eram.c(3209): warning C28751: Banned usage of ExAllocatePool and its variants: ExAllocatePool is a banned API for improved error handling purposes.
  88. c:\eram_vs\eram.c(3476): warning C28159: Consider using 'IoReportResourceForDetection if needed' instead of 'IoReportResourceUsage'. Reason: Obsolete
  89. c:\eram_vs\eram.c(3514): warning C28159: Consider using 'IoReportResourceForDetection if needed' instead of 'IoReportResourceUsage'. Reason: Obsolete
  90. c:\eram_vs\eram.c(3670): warning C28159: Consider using '(see documentation)' instead of 'HalTranslateBusAddress'. Reason: Obsolete
  91. c:\eram_vs\eram.c(3720): warning C28159: Consider using 'IoReportResourceForDetection if needed' instead of 'IoReportResourceUsage'. Reason: Obsolete
  92. c:\eram_vs\eram.c(3744): warning C28159: Consider using 'IoReportResourceForDetection if needed' instead of 'IoReportResourceUsage'. Reason: Obsolete
  93. c:\eram_vs\eram.c(3850): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
  94. c:\eram_vs\eram.c(3916): warning C26451: Arithmetic overflow: Using operator '+' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '+' to avoid overflow (io.2).
  95. Done building project "eram.vcxproj".
  96. ========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement