libobs/graphics: Fix printf format warning
Added cast to unsigned and the assert because microsoft's compiler doesn't support "%zu" Actual warning: libobs/graphics/effect-parser.c:1387:4: warning: format specifies type 'unsigned int' but the argument has type 'size_t' (aka 'unsigned long') [-Wformat]
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
#include <assert.h>
|
||||
#include <limits.h>
|
||||
#include "../util/platform.h"
|
||||
#include "effect-parser.h"
|
||||
#include "effect.h"
|
||||
@@ -1383,8 +1384,9 @@ static inline bool ep_compile_pass_shader(struct effect_parser *ep,
|
||||
/*else if (type == SHADER_GEOMETRY)
|
||||
dstr_cat(&location, " (Geometry ");*/
|
||||
|
||||
assert(pass_idx <= UINT_MAX);
|
||||
dstr_catf(&location, "shader, technique %s, pass %u)", tech->name,
|
||||
pass_idx);
|
||||
(unsigned)pass_idx);
|
||||
|
||||
if (type == GS_SHADER_VERTEX) {
|
||||
ep_makeshaderstring(ep, &shader_str,
|
||||
|
Reference in New Issue
Block a user