Skip to content

Conversation

pcolberg
Copy link
Contributor

@pcolberg pcolberg commented Feb 24, 2022

The cast is required since syscall() provides a generalized interface.

See, e.g. https://github.com/elogind/elogind/blob/06e702c9dafa3ea1dd6df8ee8cb4dcf417a0d442/src/basic/missing_syscall.h#L76-L87

[19/113] Building CXX object lib/CppUTest/CMakeFiles/CppUTest.dir/src/UtestPlatformGcc.cpp.o
../lib/CppUTest/src/UtestPlatformGcc.cpp: In function ‘pid_t gettid()’:
../lib/CppUTest/src/UtestPlatformGcc.cpp:59:50: warning: conversion to ‘pid_t {aka int}’ from ‘long int’ may alter its value [-Wconversion]
 static inline pid_t gettid(void) { return syscall( __NR_gettid ); }
                                           ~~~~~~~^~~~~~~~~~~~~~~

Prerequisite of #85

The cast is required since syscall() provides a generalized interface.

See, e.g. https://github.com/elogind/elogind/blob/06e702c9dafa3ea1dd6df8ee8cb4dcf417a0d442/src/basic/missing_syscall.h#L76-L87

[19/113] Building CXX object lib/CppUTest/CMakeFiles/CppUTest.dir/src/UtestPlatformGcc.cpp.o
../lib/CppUTest/src/UtestPlatformGcc.cpp: In function ‘pid_t gettid()’:
../lib/CppUTest/src/UtestPlatformGcc.cpp:59:50: warning: conversion to ‘pid_t {aka int}’ from ‘long int’ may alter its value [-Wconversion]
 static inline pid_t gettid(void) { return syscall( __NR_gettid ); }
                                           ~~~~~~~^~~~~~~~~~~~~~~
@pcolberg pcolberg self-assigned this Feb 24, 2022
@pcolberg pcolberg requested a review from zibaiwan February 24, 2022 00:27
@pcolberg pcolberg merged commit 1dd236b into intel:main Feb 24, 2022
@pcolberg pcolberg deleted the cpputest-gettid branch February 24, 2022 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants