Skip to content

Commit

Permalink
remove warnings from matlab
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Apr 29, 2019
1 parent 0d61c4b commit 70551fe
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
4 changes: 3 additions & 1 deletion base64decode.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
% License : BSD, see LICENSE_*.txt
%

error(nargchk(1, 1, nargin));
if(nargin==0)
error('you must provide at least 1 input');
end
error(javachk('jvm'));
if ischar(input), input = uint8(input); end

Expand Down
6 changes: 4 additions & 2 deletions base64encode.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@
% License : BSD, see LICENSE_*.txt
%

error(nargchk(1, 1, nargin));
if(nargin==0)
error('you must provide at least 1 input');
end
error(javachk('jvm'));
if ischar(input), input = uint8(input); end

output = char(org.apache.commons.codec.binary.Base64.encodeBase64Chunked(input))';

output = regexprep(output,'\r','');
end
4 changes: 3 additions & 1 deletion gzipdecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
% License : BSD, see LICENSE_*.txt
%

error(nargchk(1, 1, nargin));
if(nargin==0)
error('you must provide at least 1 input');
end
error(javachk('jvm'));
if ischar(input)
warning('gzipdecode:inputTypeMismatch', ...
Expand Down
4 changes: 3 additions & 1 deletion gzipencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
% License : BSD, see LICENSE_*.txt
%

error(nargchk(1, 1, nargin));
if(nargin==0)
error('you must provide at least 1 input');
end
error(javachk('jvm'));
if ischar(input), input = uint8(input); end
if ~isa(input, 'int8') && ~isa(input, 'uint8')
Expand Down
4 changes: 3 additions & 1 deletion zlibdecode.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@
% License : BSD, see LICENSE_*.txt
%

error(nargchk(1, 1, nargin));
if(nargin==0)
error('you must provide at least 1 input');
end
error(javachk('jvm'));
if ischar(input)
warning('zlibdecode:inputTypeMismatch', ...
Expand Down
4 changes: 3 additions & 1 deletion zlibencode.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
%


error(nargchk(1, 1, nargin));
if(nargin==0)
error('you must provide at least 1 input');
end
error(javachk('jvm'));
if ischar(input), input = uint8(input); end
if ~isa(input, 'int8') && ~isa(input, 'uint8')
Expand Down

0 comments on commit 70551fe

Please sign in to comment.