This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push: new a9bd4dbe0 Fix compiler errors a9bd4dbe0 is described below commit a9bd4dbe0190f08f2be688833536b620e1824864 Author: hujun5 <huj...@xiaomi.com> AuthorDate: Tue May 21 21:52:09 2024 +0800 Fix compiler errors taskset.c: In function 'taskset_main': Error: taskset.c:141:48: error: format '%x' expects argument of type 'unsigned int', but argument 3 has type 'cpu_set_t' {aka 'long unsigned int'} [-Werror=format=] 141 | printf("pid %d's current affinity mask: %x\n", pid, cpuset); | ~^ ~~~~~~ | | | | | cpu_set_t {aka long unsigned int} | unsigned int | %lx cc1: all warnings being treated as errors make[2]: *** [/github/workspace/sources/apps/Application.mk:271: taskset.c.github.workspace.sources.apps.system.taskset.o] Error 1 make[2]: Target 'all' not remade because of errors. make[1]: *** [Makefile:51: /github/workspace/sources/apps/system/taskset_all] Error 2 make[1]: Target 'all' not remade because of errors. make: *** [tools/LibTargets.mk:232: /github/workspace/sources/apps/libapps.a] Error 2 make: Target 'all' not remade because of errors. Signed-off-by: hujun5 <huj...@xiaomi.com> --- system/taskset/taskset.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/system/taskset/taskset.c b/system/taskset/taskset.c index 650150d98..3cffd2e28 100644 --- a/system/taskset/taskset.c +++ b/system/taskset/taskset.c @@ -138,7 +138,8 @@ int main(int argc, FAR char *argv[]) goto errout; } - printf("pid %d's current affinity mask: %x\n", pid, cpuset); + printf("pid %d's current affinity mask: 0x%" PRIx32 "\n", pid, + (uint32_t)cpuset); } else {