Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convert const char[] to char[] to avoid conversion warnings #337

Merged
merged 3 commits into from
Mar 23, 2017
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions source/sqlsrv/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,13 @@ PHP_RINIT_FUNCTION(sqlsrv)
LOG_FUNCTION( "PHP_RINIT for php_sqlsrv" );

// read INI settings
// need to convert const char[] to char[] to avoid converting string to char* warnings
// cannot simply cast const char[] to char* since INI_INT needs the sizeof(param) and the size of char* is always 4 / 8 bytes
char warnings_as_errors[] = INI_PREFIX INI_WARNINGS_RETURN_AS_ERRORS;
char severity[] = INI_PREFIX INI_LOG_SEVERITY;
char subsystems[] = INI_PREFIX INI_LOG_SUBSYSTEMS;
char buffered_limit[] = INI_PREFIX INI_BUFFERED_QUERY_LIMIT;

SQLSRV_G( warnings_return_as_errors ) = INI_BOOL( INI_PREFIX INI_WARNINGS_RETURN_AS_ERRORS );
SQLSRV_G( log_severity ) = INI_INT( INI_PREFIX INI_LOG_SEVERITY );
SQLSRV_G( log_subsystems ) = INI_INT( INI_PREFIX INI_LOG_SUBSYSTEMS );
Expand Down