Skip to content

Commit 909e479

Browse files
yanghuataoxiaoxiang781216
authored andcommitted
toolchain/ghs: Fix green hills toolchain build Vela warnings
Signed-off-by: yanghuatao <[email protected]>
1 parent 8545512 commit 909e479

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
*.a
2+
*.dbo
3+
*.dba
24
*.adb
35
*.asm
46
*.dSYM

nshlib/nsh_alias.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,6 @@ int cmd_unalias(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
392392
{
393393
FAR struct nsh_alias_s *alias;
394394
FAR char **arg;
395-
int option;
396395
int ret = OK;
397396

398397
/* Init, if necessary */
@@ -408,7 +407,7 @@ int cmd_unalias(FAR struct nsh_vtbl_s *vtbl, int argc, FAR char **argv)
408407

409408
/* If '-a' is provided, then just wipe them all */
410409

411-
if ((option = getopt(argc, argv, "a")) == 'a')
410+
if (getopt(argc, argv, "a") == 'a')
412411
{
413412
alias_removeall(vtbl);
414413
return ret;

testing/ostest/semtimed.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,11 @@ static void ostest_gettime(struct timespec *tp)
7777
printf("ostest_gettime: ERROR: clock_gettime failed\n");
7878
ASSERT(false);
7979
}
80+
#ifdef CONFIG_SYSTEM_TIME64
8081
else if (tp->tv_sec < 0 || tp->tv_nsec < 0 ||
82+
#else
83+
else if (tp->tv_nsec < 0 ||
84+
#endif
8185
tp->tv_nsec >= 1000 * 1000 * 1000)
8286
{
8387
printf("ostest_gettime: ERROR: clock_gettime returned bogus time\n");

0 commit comments

Comments
 (0)