[Piglit] [PATCH] crucible: fix m32 build errors due to formatting for uint64 and size_t
Clayton Craft
clayton.a.craft at intel.com
Thu Dec 7 02:49:30 UTC 2017
This fixes compile errors when building crucible for m32 targets, mainly
that %lu means something different on m32 than it does on m64.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=104149
---
src/framework/test/t_phase_setup.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/framework/test/t_phase_setup.c b/src/framework/test/t_phase_setup.c
index 571c744..4a99d1e 100644
--- a/src/framework/test/t_phase_setup.c
+++ b/src/framework/test/t_phase_setup.c
@@ -19,6 +19,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
+#define __STDC_FORMAT_MACROS
+#include <inttypes.h>
#include "test.h"
#include "t_phase_setup.h"
@@ -309,25 +311,25 @@ static VkBool32 debug_cb(VkDebugReportFlagsEXT flags,
void *pUserData)
{
if (flags & VK_DEBUG_REPORT_INFORMATION_BIT_EXT)
- logi("object %lu type 0x%x location %lu code %u layer \"%s\" msg %s",
+ logi("object %"PRIu64" type 0x%x location %zu code %u layer \"%s\" msg %s",
object, objectType, location, messageCode, pLayerPrefix, pMessage);
if (flags & VK_DEBUG_REPORT_WARNING_BIT_EXT)
- logw("object %lu type 0x%x location %lu code %u layer \"%s\" msg %s",
+ logw("object %"PRIu64" type 0x%x location %zu code %u layer \"%s\" msg %s",
object, objectType, location, messageCode, pLayerPrefix, pMessage);
if (flags & VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT)
- logw("object %lu type 0x%x location %lu code %u layer \"%s\" msg %s",
+ logw("object %"PRIu64" type 0x%x location %zu code %u layer \"%s\" msg %s",
object, objectType, location, messageCode, pLayerPrefix, pMessage);
if (flags & VK_DEBUG_REPORT_ERROR_BIT_EXT)
- loge("object %lu type 0x%x location %lu code %u layer \"%s\" msg %s",
+ loge("object %"PRIu64" type 0x%x location %zu code %u layer \"%s\" msg %s",
object, objectType, location, messageCode, pLayerPrefix, pMessage);
/* We don't want to spam the logs in case both debug and info bit set. */
if (flags & VK_DEBUG_REPORT_DEBUG_BIT_EXT &&
!flags & VK_DEBUG_REPORT_INFORMATION_BIT_EXT)
- logd("object %lu type 0x%x location %lu code %u layer \"%s\" msg %s",
+ logd("object %"PRIu64" type 0x%x location %zu code %u layer \"%s\" msg %s",
object, objectType, location, messageCode, pLayerPrefix, pMessage);
return false;
--
2.14.3
More information about the Piglit
mailing list