[asterisk-commits] asttest: Be explicit about the signedness of chars. (testsuite[master])
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue May 31 16:43:53 CDT 2022
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/18547 )
Change subject: asttest: Be explicit about the signedness of chars.
......................................................................
asttest: Be explicit about the signedness of chars.
On arm64, chars are unsigned by default - as opposed to x86 where they
are signed by default. This causes problems when trying to compare
chars with negative numbers so be explicit where it matters.
Change-Id: I3f85d9252ae39227d82d5efaf6e6874cdfa71138
---
M asttest/asttest.c
M asttest/tools/mkstring.c
2 files changed, 2 insertions(+), 2 deletions(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
Kevin Harwell: Looks good to me, approved
Friendly Automation: Approved for Submit
diff --git a/asttest/asttest.c b/asttest/asttest.c
index 4375fa6..152d84a 100644
--- a/asttest/asttest.c
+++ b/asttest/asttest.c
@@ -73,7 +73,7 @@
* @return 0 success
*/
int parse_cmdline(int argc, char *argv[], struct asttest_opts *opts) {
- char c;
+ signed char c;
memset(opts, 0, sizeof(struct asttest_opts));
/* set some default options */
diff --git a/asttest/tools/mkstring.c b/asttest/tools/mkstring.c
index 670477b..27774e0 100644
--- a/asttest/tools/mkstring.c
+++ b/asttest/tools/mkstring.c
@@ -66,7 +66,7 @@
}
int parse_cmdline(int argc, char *argv[], struct mkstring_options *opts) {
- char c;
+ signed char c;
int i;
while ((c = getopt(argc, argv, "n:o:")) != -1) {
switch (c) {
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/18547
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Change-Id: I3f85d9252ae39227d82d5efaf6e6874cdfa71138
Gerrit-Change-Number: 18547
Gerrit-PatchSet: 1
Gerrit-Owner: Sean Bright <sean at seanbright.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-commits/attachments/20220531/901442bf/attachment.html>
More information about the asterisk-commits
mailing list