-
Tobias Grosser authored
Isl defines its own set of memory management macros. These macros currently expect an isl_ctx*, but do not yet actively use it. Hence, it is possible to pass a random string to these macros, without the compiler issuing any warnings. And in case an isl_ctx* is passed, the compiler does not count the macro call as a valid use, which may lead to some unexpected 'variable never used' warnings. We solve this, by adding a compile time check that always verifies that ctx has the type isl_ctx*. This is also a valid use of ctx and consequently stops the 'variable never used' warnings. The check itself is designed such that it will be optimized out during compilation. While at this fix all cases, where some invalid structures were passed to the memory location macros instead of an valid isl_ctx*. Signed-off-by:
Tobias Grosser <tobias@grosser.es> Signed-off-by:
Sven Verdoolaege <skimo@kotnet.org>
Tobias Grosser authoredIsl defines its own set of memory management macros. These macros currently expect an isl_ctx*, but do not yet actively use it. Hence, it is possible to pass a random string to these macros, without the compiler issuing any warnings. And in case an isl_ctx* is passed, the compiler does not count the macro call as a valid use, which may lead to some unexpected 'variable never used' warnings. We solve this, by adding a compile time check that always verifies that ctx has the type isl_ctx*. This is also a valid use of ctx and consequently stops the 'variable never used' warnings. The check itself is designed such that it will be optimized out during compilation. While at this fix all cases, where some invalid structures were passed to the memory location macros instead of an valid isl_ctx*. Signed-off-by:
Tobias Grosser <tobias@grosser.es> Signed-off-by:
Sven Verdoolaege <skimo@kotnet.org>
Loading