[haiku-commits] haiku: hrev53419 - in src/tests: servers/registrar kits/storage/testapps kits/support

  • From: waddlesplash <waddlesplash@xxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 30 Aug 2019 10:05:44 -0400 (EDT)

hrev53419 adds 3 changesets to branch 'master'
old head: ecba909c8ce258df90744f9845b0ffecb15fb896
new head: f31e9e37d912d2610d47e50360a2524af2792b66
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=f31e9e37d912+%5Eecba909c8ce2

----------------------------------------------------------------------------

79ec5aac1f39: RosterShell.cpp: Fix for error: cast from 'void*' to 'team_id' 
loses precision
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: Icc4fb1347b2473f52e4b25855356c0708651edf4
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1765
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

1abefaffb716: string_utf8_tests.cpp: Add missing include for exit() definition
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: I555d9479307747c13b104bc6a99af672641ae2c7
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1766
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

f31e9e37d912: clipboard.cpp test: Fix invalid type
  
  Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
  Change-Id: Ie1d098d23915d7585f7e8023adcea4ed0abca55f
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1767
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                   [ Jaroslaw Pelczar <jarek@xxxxxxxxxxxx> ]

----------------------------------------------------------------------------

3 files changed, 7 insertions(+), 5 deletions(-)
src/tests/kits/storage/testapps/clipboard.cpp | 2 +-
src/tests/kits/support/string_utf8_tests.cpp  | 1 +
src/tests/servers/registrar/RosterShell.cpp   | 9 +++++----

############################################################################

Commit:      79ec5aac1f39e4a6b0916439b7d32b555f739a9f
URL:         https://git.haiku-os.org/haiku/commit/?id=79ec5aac1f39
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 07:59:09 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:05:41 2019 UTC

RosterShell.cpp: Fix for error: cast from 'void*' to 'team_id' loses precision

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: Icc4fb1347b2473f52e4b25855356c0708651edf4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1765
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/tests/servers/registrar/RosterShell.cpp 
b/src/tests/servers/registrar/RosterShell.cpp
index 4238ba03c5..0dd89a6505 100644
--- a/src/tests/servers/registrar/RosterShell.cpp
+++ b/src/tests/servers/registrar/RosterShell.cpp
@@ -5,6 +5,7 @@
 #include <string.h>
 #include <strstream>
 #include <vector>
+#include <iostream>
 
 #include <List.h>
 #include <Path.h>
@@ -80,7 +81,7 @@ public:
                        return;
                }
                // activate the team
-               team_id team = (team_id)teamList.ItemAt(0);
+               team_id team = (team_id)(uintptr_t)teamList.ItemAt(0);
                status_t error = roster.ActivateApp(team);
                if (error != B_OK) {
                        printf("activate: failed to activate application %ld: 
%s\n",
@@ -148,7 +149,7 @@ public:
                printf("%-8s%-40s\n", "team", "signature");
                
printf("---------------------------------------------------------\n");
                for (int32 i = 0; i < count; i++) {
-                       team_id team = (team_id)teamList.ItemAt(i);
+                       team_id team = (team_id)(uintptr_t)teamList.ItemAt(i);
                        app_info info;
                        status_t error = roster.GetRunningAppInfo(team, &info);
                        if (error == B_OK)
@@ -173,7 +174,7 @@ public:
                // print an info for each team
                int32 count = teamList.CountItems();
                for (int32 i = 0; i < count; i++) {
-                       team_id team = (team_id)teamList.ItemAt(i);
+                       team_id team = (team_id)(uintptr_t)teamList.ItemAt(i);
                        printf("team %8ld\n", team);
                        printf("-------------\n");
                        app_info info;
@@ -207,7 +208,7 @@ public:
                }
                // send a B_QUIT_REQUESTED message to each team
                for (int32 i = 0; i < count; i++) {
-                       team_id team = (team_id)teamList.ItemAt(i);
+                       team_id team = (team_id)(uintptr_t)teamList.ItemAt(i);
                        status_t error = B_OK;
                        BMessenger messenger(NULL, team, &error);
                        if (messenger.IsValid()) {

############################################################################

Commit:      1abefaffb71671724a34db2762b5fc92fc4eaff5
URL:         https://git.haiku-os.org/haiku/commit/?id=1abefaffb716
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 08:03:42 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:05:41 2019 UTC

string_utf8_tests.cpp: Add missing include for exit() definition

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: I555d9479307747c13b104bc6a99af672641ae2c7
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1766
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/tests/kits/support/string_utf8_tests.cpp 
b/src/tests/kits/support/string_utf8_tests.cpp
index 070f467a4a..c043add103 100644
--- a/src/tests/kits/support/string_utf8_tests.cpp
+++ b/src/tests/kits/support/string_utf8_tests.cpp
@@ -1,4 +1,5 @@
 #include <stdio.h>
+#include <stdlib.h>
 #include <SupportDefs.h>
 #include <String.h>
 #include <InterfaceDefs.h>

############################################################################

Revision:    hrev53419
Commit:      f31e9e37d912d2610d47e50360a2524af2792b66
URL:         https://git.haiku-os.org/haiku/commit/?id=f31e9e37d912
Author:      Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Date:        Wed Aug 28 08:05:10 2019 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Fri Aug 30 14:05:41 2019 UTC

clipboard.cpp test: Fix invalid type

Signed-off-by: Jaroslaw Pelczar <jarek@xxxxxxxxxxxx>
Change-Id: Ie1d098d23915d7585f7e8023adcea4ed0abca55f
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1767
Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/tests/kits/storage/testapps/clipboard.cpp 
b/src/tests/kits/storage/testapps/clipboard.cpp
index 5b1d9bdbed..38f273919d 100644
--- a/src/tests/kits/storage/testapps/clipboard.cpp
+++ b/src/tests/kits/storage/testapps/clipboard.cpp
@@ -88,7 +88,7 @@ void
 clipboard_dump(BClipboard &clipboard)
 {
        const char *data;
-       int32 size;
+       ssize_t size;
        if (clipboard.Data()->FindData("text/plain", B_MIME_TYPE,
                (const void**)&data, &size) == B_OK) {
                printf("%.*s\n", (int)size, data);


Other related posts:

  • » [haiku-commits] haiku: hrev53419 - in src/tests: servers/registrar kits/storage/testapps kits/support - waddlesplash