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

Issue 10907228: Use casts to work around bug in Android TEMP_FAILURE_RETRY macro (Closed)

Created:
8 years, 3 months ago by jackpal
Modified:
8 years, 3 months ago
Reviewers:
Ivan Posva
CC:
reviews_dartlang.org, Mads Ager (google)
Visibility:
Public.

Description

Use casts to work around bug in Android TEMP_FAILURE_RETRY macro See http://code.google.com/p/android/issues/detail?id=37426 "unistd.h TEMP_FAILURE_RETRY generates warning when used with syscall that returns unsigned int". The Android version of this macro will generate a signed/unsigned comparison when used with a syscall function that returns an unsigned value such as inet_addr(), which returns in_addr_t, which is defined as an unsigned int. By casting the result to an int before the macro processes it, and then casting it back to an in_addr_t after the macro returns it we are able to avoid the signed/unsigned comparison, and so avoid the signed/unsigned comparison warning. Committed: https://code.google.com/p/dart/source/detail?r=12395

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -1 line) Patch
M runtime/bin/socket_android.cc View 1 chunk +6 lines, -1 line 0 comments Download

Messages

Total messages: 3 (0 generated)
jackpal
8 years, 3 months ago (2012-09-14 00:20:43 UTC) #1
jackpal
Guessing iposva would be interested in reviewing (from git blame of runtime/bin/socket_linux.cc .) Please let ...
8 years, 3 months ago (2012-09-14 00:54:51 UTC) #2
Ivan Posva
8 years, 3 months ago (2012-09-14 08:06:58 UTC) #3
cc: ager

LGTM -ip

Powered by Google App Engine
This is Rietveld 408576698