]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
main/test: Fix compilation issue on 32-bit systems
authorMatthew Jordan <mjordan@digium.com>
Thu, 4 Dec 2014 17:12:55 +0000 (17:12 +0000)
committerMatthew Jordan <mjordan@digium.com>
Thu, 4 Dec 2014 17:12:55 +0000 (17:12 +0000)
On a 32-bit system, a type of intmax_t will result in a compilation warning
when formatted as a 'long int'. Use the format specifier of %jd (which was
what was used originally in manager.c) to format the JSON extracted integer
on both 32-/64-bit systems.

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@428972 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/test.c

index c469465cb6b7f700b413cc271cabcaf71d1e86e5..0bdf43a7d318e703126d4cec542de663b612756c 100644 (file)
@@ -1035,7 +1035,7 @@ static struct ast_manager_event_blob *test_suite_event_to_ami(struct stasis_mess
                ast_json_string_get(ast_json_object_get(blob, "appfile")));
        ast_str_append(&packet_string, 0, "AppFunction: %s\r\n",
                ast_json_string_get(ast_json_object_get(blob, "appfunction")));
-       ast_str_append(&packet_string, 0, "AppLine: %ld\r\n",
+       ast_str_append(&packet_string, 0, "AppLine: %jd\r\n",
                ast_json_integer_get(ast_json_object_get(blob, "line")));
        ast_str_append(&packet_string, 0, "%s\r\n",
                ast_json_string_get(ast_json_object_get(blob, "data")));