Skip to content

Commit

Permalink
win32/msvc: workaround for windows
Browse files Browse the repository at this point in the history
Signed-off-by: chao an <[email protected]>
  • Loading branch information
anchao committed Jul 13, 2023
1 parent ea5a608 commit aa8501c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions drivers/net/netdev_upperhalf.c
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,7 @@ int netdev_upper_wireless_ioctl(FAR struct netdev_lowerhalf_s *lower,
FAR const struct wireless_ops_s *ops = lower->iw_ops;
const struct ether_addr zero =
{
0
};

/* Decode and dispatch the driver-specific IOCTL command */
Expand Down
4 changes: 2 additions & 2 deletions mm/mempool/mempool_multiple.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ mempool_multiple_alloc_chunk(FAR struct mempool_multiple_s *mpool,
}

ret = (FAR void *)ALIGN_UP(chunk->next, align);
if (chunk->end - (FAR char *)ret < size)
if ((uintptr_t)chunk->end - (uintptr_t)ret < size)
{
goto retry;
}
Expand Down Expand Up @@ -738,7 +738,7 @@ mempool_multiple_mallinfo(FAR struct mempool_multiple_s *mpool)
FAR struct mpool_chunk_s *chunk;

chunk = (FAR struct mpool_chunk_s *)sq_peek(&mpool->chunk_queue);
info.fordblks += chunk->end - chunk->next;
info.fordblks += (uintptr_t)chunk->end - (uintptr_t)chunk->next;
}

nxmutex_unlock(&mpool->lock);
Expand Down
4 changes: 4 additions & 0 deletions net/local/local_fifo.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,12 @@
#define LOCAL_HD_SUFFIX "HD" /* Name of the half duplex datagram FIFO */
#define LOCAL_SUFFIX_LEN 2

#ifndef _MSC_VER
#define LOCAL_FULLPATH_LEN (strlen(CONFIG_NET_LOCAL_VFS_PATH) + \
UNIX_PATH_MAX + LOCAL_SUFFIX_LEN + 2)
#else
#define LOCAL_FULLPATH_LEN (UNIX_PATH_MAX + LOCAL_SUFFIX_LEN + 2)
#endif

/****************************************************************************
* Private Functions
Expand Down
6 changes: 6 additions & 0 deletions sched/misc/assert.c
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg)

/* Dump interesting properties of this task */

#ifndef _MSC_VER
_alert(" %4d %5d"
#ifdef CONFIG_SMP
" %4d"
Expand Down Expand Up @@ -380,6 +381,7 @@ static void dump_task(FAR struct tcb_s *tcb, FAR void *arg)
#endif
, args
);
#endif
}

/****************************************************************************
Expand Down Expand Up @@ -414,6 +416,7 @@ static void dump_tasks(void)

/* Dump interesting properties of each task in the crash environment */

#ifndef _MSC_VER
_alert(" PID GROUP"
#ifdef CONFIG_SMP
" CPU"
Expand Down Expand Up @@ -457,6 +460,7 @@ static void dump_tasks(void)
(stack_filled >= 10 * 80 ? '!' : ' ')
# endif
);
#endif
#endif

nxsched_foreach(dump_task, NULL);
Expand Down Expand Up @@ -580,6 +584,7 @@ void _assert(FAR const char *filename, int linenum,
name.sysname, name.nodename,
name.release, name.version, name.machine);

#ifndef _MSC_VER
_alert("Assertion failed %s: at file: %s:%d task"
#ifdef CONFIG_SMP
"(CPU%d)"
Expand All @@ -598,6 +603,7 @@ void _assert(FAR const char *filename, int linenum,
rtcb->name,
#endif
rtcb->entry.main);
#endif

/* Show back trace */

Expand Down

0 comments on commit aa8501c

Please sign in to comment.