|
From: <kin...@us...> - 2025-09-17 19:39:08
|
Revision: 7444
http://sourceforge.net/p/teem/code/7444
Author: kindlmann
Date: 2025-09-17 19:39:05 +0000 (Wed, 17 Sep 2025)
Log Message:
-----------
slowly converting some count values to type uint
Modified Paths:
--------------
teem/trunk/src/hest/parseHest.c
teem/trunk/src/hest/privateHest.h
Modified: teem/trunk/src/hest/parseHest.c
===================================================================
--- teem/trunk/src/hest/parseHest.c 2025-09-17 13:23:35 UTC (rev 7443)
+++ teem/trunk/src/hest/parseHest.c 2025-09-17 19:39:05 UTC (rev 7444)
@@ -443,25 +443,23 @@
return 0;
}
-int
+uint
_hestErrStrlen(const hestOpt *opt, int argc, const char **argv) {
- int ai, optNum, ret, other;
-
- ret = 0;
- optNum = hestOptNum(opt);
- other = AIR_FALSE;
+ uint ret = 0;
+ uint optNum = hestOptNum(opt);
+ int other = AIR_FALSE;
if (argv) {
- for (ai = 0; ai < argc; ai++) {
- ret = AIR_MAX(ret, (int)airStrlen(argv[ai]));
+ for (uint ai = 0; ai < (uint)argc; ai++) {
+ ret = AIR_MAX(ret, airStrlen(argv[ai]));
}
}
- for (ai = 0; ai < optNum; ai++) {
- ret = AIR_MAX(ret, (int)airStrlen(opt[ai].flag));
- ret = AIR_MAX(ret, (int)airStrlen(opt[ai].name));
+ for (uint ai = 0; ai < optNum; ai++) {
+ ret = AIR_MAX(ret, airStrlen(opt[ai].flag));
+ ret = AIR_MAX(ret, airStrlen(opt[ai].name));
other |= opt[ai].type == airTypeOther;
}
- for (ai = airTypeUnknown + 1; ai < airTypeLast; ai++) {
- ret = AIR_MAX(ret, (int)airStrlen(airTypeStr[ai]));
+ for (uint ai = airTypeUnknown + 1; ai < airTypeLast; ai++) {
+ ret = AIR_MAX(ret, airStrlen(airTypeStr[ai]));
}
if (other) {
/* the callback's error() function may sprintf an error message
Modified: teem/trunk/src/hest/privateHest.h
===================================================================
--- teem/trunk/src/hest/privateHest.h 2025-09-17 13:23:35 UTC (rev 7443)
+++ teem/trunk/src/hest/privateHest.h 2025-09-17 19:39:05 UTC (rev 7444)
@@ -21,6 +21,8 @@
extern "C" {
#endif
+#include <assert.h>
+
typedef unsigned int uint;
/* methodsHest.c */
@@ -29,7 +31,7 @@
/* parseHest.c */
extern int _hestOptCheck(const hestOpt *opt, char *err, const hestParm *parm);
-extern int _hestErrStrlen(const hestOpt *opt, int argc, const char **argv);
+extern uint _hestErrStrlen(const hestOpt *opt, int argc, const char **argv);
#ifdef __cplusplus
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|