[haiku-commits] r40121 - haiku/trunk/src/system/kernel/cache

  • From: ingo_weinhold@xxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 4 Jan 2011 22:28:46 +0100 (CET)

Author: bonefish
Date: 2011-01-04 22:28:46 +0100 (Tue, 04 Jan 2011)
New Revision: 40121
Changeset: http://dev.haiku-os.org/changeset/40121

Modified:
   haiku/trunk/src/system/kernel/cache/block_cache.cpp
Log:
Added intermediate (addr_t) casts before the cast of the parse_expression()
result (uint64) to pointer (CID 4723-4726).


Modified: haiku/trunk/src/system/kernel/cache/block_cache.cpp
===================================================================
--- haiku/trunk/src/system/kernel/cache/block_cache.cpp 2011-01-04 21:16:53 UTC 
(rev 40120)
+++ haiku/trunk/src/system/kernel/cache/block_cache.cpp 2011-01-04 21:28:46 UTC 
(rev 40121)
@@ -2091,7 +2091,7 @@
                return 0;
        }
 
-       dump_block_long((struct cached_block*)parse_expression(argv[1]));
+       dump_block_long((struct 
cached_block*)(addr_t)parse_expression(argv[1]));
        return 0;
 }
 
@@ -2124,7 +2124,7 @@
                return 0;
        }
 
-       block_cache* cache = (struct block_cache*)parse_expression(argv[i]);
+       block_cache* cache = (struct 
block_cache*)(addr_t)parse_expression(argv[i]);
        if (cache == NULL) {
                kprintf("invalid cache address\n");
                return 0;
@@ -2238,9 +2238,9 @@
        cache_transaction* transaction = NULL;
 
        if (argc - i == 1) {
-               transaction = (cache_transaction*)parse_expression(argv[i]);
+               transaction = 
(cache_transaction*)(addr_t)parse_expression(argv[i]);
        } else {
-               block_cache* cache = (block_cache*)parse_expression(argv[i]);
+               block_cache* cache = 
(block_cache*)(addr_t)parse_expression(argv[i]);
                int32 id = parse_expression(argv[i + 1]);
                transaction = lookup_transaction(cache, id);
                if (transaction == NULL) {


Other related posts:

  • » [haiku-commits] r40121 - haiku/trunk/src/system/kernel/cache - ingo_weinhold