From: Joseph Sutton Date: Wed, 10 Jan 2024 03:55:19 +0000 (+1300) Subject: s4:scripting: Align integer types X-Git-Tag: talloc-2.4.2~111 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71f1aee6cae709a8587ef842271c2a43d086dfc6;p=thirdparty%2Fsamba.git s4:scripting: Align integer types Commit a41112fcc984c19d5123e4a49a5f5fd4341e811d updated the generated code, but not the corresponding generation script. Signed-off-by: Joseph Sutton Reviewed-by: Douglas Bagnall --- diff --git a/source4/scripting/bin/gen_hresult.py b/source4/scripting/bin/gen_hresult.py index 13a5a56eb0f..490f40488e8 100755 --- a/source4/scripting/bin/gen_hresult.py +++ b/source4/scripting/bin/gen_hresult.py @@ -170,7 +170,7 @@ def generateSourceFile(out_file): out_file.write("const char *hresult_errstr_const(HRESULT err_code)\n") out_file.write("{\n") out_file.write(" const char *result = NULL;\n") - out_file.write(" int i;\n") + out_file.write(" size_t i;\n") out_file.write(" for (i = 0; i < ARRAY_SIZE(hresult_errs); ++i) {\n") out_file.write(" if (HRES_IS_EQUAL(err_code, hresult_errs[i].error_code)) {\n") out_file.write(" result = hresult_errs[i].error_message;\n") @@ -188,7 +188,7 @@ def generateSourceFile(out_file): out_file.write("const char *hresult_errstr(HRESULT err_code)\n") out_file.write("{\n") out_file.write(" static char msg[22];\n") - out_file.write(" int i;\n") + out_file.write(" size_t i;\n") out_file.write("\n") out_file.write(" for (i = 0; i < ARRAY_SIZE(hresult_errs); i++) {\n") out_file.write(" if (HRES_IS_EQUAL(err_code, hresult_errs[i].error_code)) {\n")