Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
17974029
Commit
17974029
authored
8 years ago
by
Makarand Dharmapurikar
Browse files
Options
Downloads
Patches
Plain Diff
fixed compiler warning #2
parent
c66ac4f8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/objective-c/GRPCClient/private/NSData+GRPC.m
+5
-3
5 additions, 3 deletions
src/objective-c/GRPCClient/private/NSData+GRPC.m
with
5 additions
and
3 deletions
src/objective-c/GRPCClient/private/NSData+GRPC.m
+
5
−
3
View file @
17974029
...
@@ -70,8 +70,8 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,
...
@@ -70,8 +70,8 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,
return
nil
;
return
nil
;
}
}
char
*
array
;
char
*
array
;
NSUInteger
length
;
size_t
length
;
MallocAndCopyByteBufferToCharArray
(
buffer
,
(
size_t
*
)
&
length
,
&
array
);
MallocAndCopyByteBufferToCharArray
(
buffer
,
&
length
,
&
array
);
if
(
!
array
)
{
if
(
!
array
)
{
// TODO(jcanizales): grpc_byte_buffer is reference-counted, so we can
// TODO(jcanizales): grpc_byte_buffer is reference-counted, so we can
// prevent this memory problem by implementing a subclass of NSData
// prevent this memory problem by implementing a subclass of NSData
...
@@ -79,7 +79,9 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,
...
@@ -79,7 +79,9 @@ static grpc_byte_buffer *CopyCharArrayToNewByteBuffer(const char *array,
// can be implemented using a grpc_byte_buffer_reader.
// can be implemented using a grpc_byte_buffer_reader.
return
nil
;
return
nil
;
}
}
return
[
self
dataWithBytesNoCopy
:
array
length
:
length
freeWhenDone
:
YES
];
// Not depending upon size assumption of NSUInteger
NSUInteger
length_max
=
MIN
(
length
,
UINT_MAX
);
return
[
self
dataWithBytesNoCopy
:
array
length
:
length_max
freeWhenDone
:
YES
];
}
}
-
(
grpc_byte_buffer
*
)
grpc_byteBuffer
{
-
(
grpc_byte_buffer
*
)
grpc_byteBuffer
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment