diff options
| author | bors <bors@rust-lang.org> | 2014-06-10 09:49:29 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-06-10 09:49:29 -0700 |
| commit | 9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6 (patch) | |
| tree | 6b900931014b0ea0ed76e2b6ee5ab2f78583b165 /src/librustrt | |
| parent | 0ee6a8e8a564ec0134ebdc0869fab5e4bb28024c (diff) | |
| parent | 8e34f647ee5db795e1ea46715de61cee63f4f4a7 (diff) | |
| download | rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.tar.gz rust-9bb8f88d3a79d3f8f10dca8cedf00cf57f6a94f6.zip | |
auto merge of #14696 : jakub-/rust/dead-struct-fields, r=alexcrichton
This uncovered some dead code, most notably in middle/liveness.rs, which I think suggests there must be something fishy with that part of the code. The #[allow(dead_code)] annotations on some of the fields I am not super happy about but as I understand, marker type may disappear at some point.
Diffstat (limited to 'src/librustrt')
| -rw-r--r-- | src/librustrt/mutex.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/librustrt/mutex.rs b/src/librustrt/mutex.rs index fccbe4a15e9..eec19e9d5db 100644 --- a/src/librustrt/mutex.rs +++ b/src/librustrt/mutex.rs @@ -298,10 +298,12 @@ mod imp { static _PTHREAD_MUTEX_SIG_init: libc::c_long = 0x32AAABA7; static _PTHREAD_COND_SIG_init: libc::c_long = 0x3CB0B1BB; + #[repr(C)] pub struct pthread_mutex_t { __sig: libc::c_long, __opaque: [u8, ..__PTHREAD_MUTEX_SIZE__], } + #[repr(C)] pub struct pthread_cond_t { __sig: libc::c_long, __opaque: [u8, ..__PTHREAD_COND_SIZE__], @@ -339,10 +341,12 @@ mod imp { #[cfg(target_arch = "mips")] static __SIZEOF_PTHREAD_COND_T: uint = 48 - 8; + #[repr(C)] pub struct pthread_mutex_t { __align: libc::c_longlong, size: [u8, ..__SIZEOF_PTHREAD_MUTEX_T], } + #[repr(C)] pub struct pthread_cond_t { __align: libc::c_longlong, size: [u8, ..__SIZEOF_PTHREAD_COND_T], @@ -361,7 +365,9 @@ mod imp { mod os { use libc; + #[repr(C)] pub struct pthread_mutex_t { value: libc::c_int } + #[repr(C)] pub struct pthread_cond_t { value: libc::c_int } pub static PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { |
