Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(705)

Unified Diff: linux_syscall_support.h

Issue 2780823003: Fix -Wshift-negative-value warnings with MAKE_PROCESS_CPUCLOCK. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: linux_syscall_support.h
diff --git a/linux_syscall_support.h b/linux_syscall_support.h
index 9dbd2391b2e3825731833714a81feb896ddfef46..ae6e50ae36ee36462b5f4cf317cdce7ba85ca2df 100644
--- a/linux_syscall_support.h
+++ b/linux_syscall_support.h
@@ -727,11 +727,12 @@ struct kernel_statfs {
#endif
#ifndef MAKE_PROCESS_CPUCLOCK
#define MAKE_PROCESS_CPUCLOCK(pid, clock) \
- ((~(int)(pid) << 3) | (int)(clock))
+ ((int)(~(unsigned)(pid) << 3) | (int)(clock))
#endif
#ifndef MAKE_THREAD_CPUCLOCK
#define MAKE_THREAD_CPUCLOCK(tid, clock) \
- ((~(int)(tid) << 3) | (int)((clock) | CPUCLOCK_PERTHREAD_MASK))
+ ((int)(~(unsigned)(tid) << 3) | \
+ (int)((clock) | CPUCLOCK_PERTHREAD_MASK))
#endif
#ifndef FUTEX_WAIT
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698