Fixed minor gcc warnings
[libcds.git] / test / unit / list / test_kv_iterable_list.h
index 4bb5769641d8e93af1b0822096c3d047e22572aa..87c533fc6d3d5740ffd81eeb89329ba7cd64fa6c 100644 (file)
@@ -5,7 +5,7 @@
 
     Source code repo: http://github.com/khizmax/libcds/
     Download: http://sourceforge.net/projects/libcds/files/
-    
+
     Redistribution and use in source and binary forms, with or without
     modification, are permitted provided that the following conditions are met:
 
@@ -237,7 +237,7 @@ namespace cds_test {
 
                     case 4:
                         {
-                            auto pair = l.update( i.key, []( list_value_type& n, list_value_type* old ) {
+                            auto pair = l.update( i.key, []( list_value_type&, list_value_type* ) {
                                 ASSERT_TRUE( false );
                             }, false );
                             EXPECT_FALSE( pair.first );
@@ -278,7 +278,7 @@ namespace cds_test {
                             EXPECT_TRUE( ret.second );
                             EXPECT_TRUE( l.contains( i.key ) );
 
-                            ret = l.upsert( i.key, i.val * 12 );
+                            ret = l.upsert( i.key, i.key * 12 );
                             EXPECT_TRUE( ret.first );
                             EXPECT_FALSE( ret.second );
                             EXPECT_TRUE( l.find( i.key, []( list_value_type& n ) {
@@ -303,8 +303,8 @@ namespace cds_test {
                 } ));
 
                 auto pair = l.update( i.key, []( list_value_type& n, list_value_type* old ) {
-                    EXPECT_FALSE( old == nullptr );
-                    EXPECT_EQ( n.first.nKey * 5, n.second.val );
+                    ASSERT_FALSE( old == nullptr );
+                    EXPECT_EQ( n.first.nKey * 5, old->second.val );
                     n.second.val = n.first.nKey * 3;
                 }, false );
                 EXPECT_TRUE( pair.first );