Skip to content

Commit

Permalink
Fix a few compiler warnings with clang compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerGee committed Jan 11, 2021
1 parent cb862df commit af28808
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 2 deletions.
3 changes: 3 additions & 0 deletions php-closure.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ zend_function_entry php_git2::closure_methods[] = {

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_closure_object>::handlers;

template<>
void php_zend_object<php_closure_object>::init(zend_class_entry* ce)
{
Expand Down
3 changes: 3 additions & 0 deletions php-config-backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ zend_function_entry php_git2::config_backend_methods[] = {

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_config_backend_object>::handlers;

template<>
void php_zend_object<php_config_backend_object>::init(zend_class_entry* ce)
{
Expand Down
2 changes: 1 addition & 1 deletion php-git2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ void php_git2::convert_diff_file(zval* zv,const git_diff_file* file)

array_init(zv);
add_assoc_stringl(zv,"id",buf,idlen);
add_assoc_string(zv,"path",file->path);
add_assoc_string(zv,"path",const_cast<char*>(file->path));
add_assoc_long_ex(zv,"size",sizeof("size")-1,file->size);
add_assoc_long_ex(zv,"flags",sizeof("flags")-1,file->flags);
add_assoc_long_ex(zv,"mode",sizeof("mode")-1,file->mode);
Expand Down
2 changes: 1 addition & 1 deletion php-object.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ namespace php_git2
reinterpret_cast<char*>(Z_OBJ_P(zv)) - offset()
)->storage;
}
};
};

// Define base class for object PHP values.

Expand Down
6 changes: 6 additions & 0 deletions php-odb-backend-internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ void php_git2::php_git2_make_odb_backend(

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_backend_object>::handlers;

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_backend_internal_object>::handlers;

template<>
void php_zend_object<php_odb_backend_internal_object>::init(zend_class_entry* ce)
{
Expand Down
3 changes: 3 additions & 0 deletions php-odb-backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ zend_function_entry php_git2::odb_backend_methods[] = {

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_backend_object>::handlers;

template<>
void php_zend_object<php_odb_backend_object>::init(zend_class_entry* ce)
{
Expand Down
6 changes: 6 additions & 0 deletions php-odb-stream-internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ void php_git2::php_git2_make_odb_stream(zval* zp,git_odb_stream* stream,php_git_

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_stream_object>::handlers;

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_stream_internal_object>::handlers;

template<>
void php_zend_object<php_odb_stream_internal_object>::init(zend_class_entry* ce)
{
Expand Down
3 changes: 3 additions & 0 deletions php-odb-stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ zend_function_entry php_git2::odb_stream_methods[] = {

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_stream_object>::handlers;

template<>
void php_zend_object<php_odb_stream_object>::init(zend_class_entry* ce)
{
Expand Down
6 changes: 6 additions & 0 deletions php-odb-writepack-internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ void php_git2::php_git2_make_odb_writepack(

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_writepack_object>::handlers;

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_writepack_internal_object>::handlers;

template<>
void php_zend_object<php_odb_writepack_internal_object>::init(zend_class_entry* ce)
{
Expand Down
3 changes: 3 additions & 0 deletions php-odb-writepack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ zend_function_entry php_git2::odb_writepack_methods[] = {

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_odb_writepack_object>::handlers;

template<>
void php_zend_object<php_odb_writepack_object>::init(zend_class_entry* ce)
{
Expand Down
6 changes: 6 additions & 0 deletions php-refdb-backend-internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ void php_git2::php_git2_make_refdb_backend(zval* zp,git_refdb_backend* backend,p

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_refdb_backend_object>::handlers;

template<>
zend_object_handlers php_git2::php_zend_object<php_refdb_backend_internal_object>::handlers;

template<>
void php_zend_object<php_refdb_backend_internal_object>::init(zend_class_entry* ce)
{
Expand Down
3 changes: 3 additions & 0 deletions php-refdb-backend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ zend_function_entry php_git2::refdb_backend_methods[] = {

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_refdb_backend_object>::handlers;

template<>
void php_zend_object<php_refdb_backend_object>::init(zend_class_entry* ce)
{
Expand Down
3 changes: 3 additions & 0 deletions php-writestream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ void php_git2::php_git2_make_writestream(zval* zp,git_writestream* ws)

// php_zend_object init function

template<>
zend_object_handlers php_git2::php_zend_object<php_writestream_object>::handlers;

template<>
void php_zend_object<php_writestream_object>::init(zend_class_entry* ce)
{
Expand Down

0 comments on commit af28808

Please sign in to comment.