* 'master' of https://git.php.net/repository/php-src:
  Remove compile warning:    warning: unused variable ‘j’ [-Wunused-variable]
  Remove compile warnings:   warning: variable ‘lastch’ set but not used [-Wunused-but-set-variable]   warning: variable ‘buf’ set but not used [-Wunused-but-set-variable]
  Remove compile warning: variable ‘streamp’ set but not used [-Wunused-but-set-variable]
  Remove compile warnings:   variable ‘obj_cnt’ set but not used [-Wunused-but-set-variable]   unused variable ‘last’ [-Wunused-variable]   unused variable ‘j’ [-Wunused-variable]
  Remove compile warning "variable ‘mekeylen’ set but not used"
  Reduce (some more) compile noise of 'unused variable' and 'may be used uninitialized' warnings.
  Update NEWS
This commit is contained in:
Christopher Jones 2013-08-19 18:26:59 -07:00
commit 902c3025ed
8 changed files with 5 additions and 17 deletions

View File

@ -215,7 +215,6 @@ static php_stream_filter_status_t php_bz2_compress_filter(
size_t consumed = 0;
int status;
php_stream_filter_status_t exit_status = PSFS_FEED_ME;
bz_stream *streamp;
if (!thisfilter || !thisfilter->abstract) {
/* Should never happen */
@ -223,7 +222,6 @@ static php_stream_filter_status_t php_bz2_compress_filter(
}
data = (php_bz2_filter_data *)(thisfilter->abstract);
streamp = &(data->strm);
while (buckets_in->head) {
size_t bin = 0, desired;

View File

@ -2441,7 +2441,7 @@ string_copy:
ph = HASH_OF(*zvalue);
if (!ph) {
char *name;
char *name = NULL;
switch (option) {
case CURLOPT_HTTPHEADER:
name = "CURLOPT_HTTPHEADER";

View File

@ -790,7 +790,6 @@ int
ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type, long resumepos TSRMLS_DC)
{
databuf_t *data = NULL;
int lastch;
size_t rcvd;
char arg[11];
@ -828,7 +827,6 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
goto bail;
}
lastch = 0;
while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
if (rcvd == -1) {
goto bail;
@ -1187,12 +1185,9 @@ ftp_readline(ftpbuf_t *ftp)
int
ftp_getresp(ftpbuf_t *ftp)
{
char *buf;
if (ftp == NULL) {
return 0;
}
buf = ftp->inbuf;
ftp->resp = 0;
while (1) {

View File

@ -184,7 +184,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
U_CFUNC PHP_FUNCTION(intlcal_get_now)
{
UErrorCode status = U_ZERO_ERROR;
intl_error_reset(NULL TSRMLS_CC);
if (zend_parse_parameters_none() == FAILURE) {

View File

@ -38,7 +38,6 @@ static inline GregorianCalendar *fetch_greg(Calendar_object *co) {
static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
{
zval *object = getThis();
zval **tz_object = NULL;
zval **args_a[6] = {0},
***args = &args_a[0];
@ -84,7 +83,7 @@ static void _php_intlgregcal_constructor_body(INTERNAL_FUNCTION_PARAMETERS)
}
// instantion of ICU object
GregorianCalendar *gcal;
GregorianCalendar *gcal = NULL;
if (variant <= 2) {
// From timezone and locale (0 to 2 arguments)

View File

@ -487,7 +487,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo,
}
case Formattable::kLong:
{
int32_t tInt32;
int32_t tInt32 = 0;
retry_klong:
if (Z_TYPE_PP(elem) == IS_DOUBLE) {
if (Z_DVAL_PP(elem) > (double)INT32_MAX ||
@ -517,7 +517,7 @@ retry_klong:
}
case Formattable::kInt64:
{
int64_t tInt64;
int64_t tInt64 = 0;
retry_kint64:
if (Z_TYPE_PP(elem) == IS_DOUBLE) {
if (Z_DVAL_PP(elem) > (double)U_INT64_MAX ||

View File

@ -163,7 +163,6 @@ static void resourcebundle_array_fetch(zval *object, zval *offset, zval *return_
{
int32_t meindex = 0;
char * mekey = NULL;
long mekeylen;
zend_bool is_numeric = 0;
char *pbuf;
ResourceBundle_object *rb;
@ -177,7 +176,6 @@ static void resourcebundle_array_fetch(zval *object, zval *offset, zval *return_
rb->child = ures_getByIndex( rb->me, meindex, rb->child, &INTL_DATA_ERROR_CODE(rb) );
} else if(Z_TYPE_P(offset) == IS_STRING) {
mekey = Z_STRVAL_P(offset);
mekeylen = Z_STRLEN_P(offset);
rb->child = ures_getByKey(rb->me, mekey, rb->child, &INTL_DATA_ERROR_CODE(rb) );
} else {
intl_errors_set(INTL_DATA_ERROR_P(rb), U_ILLEGAL_ARGUMENT_ERROR,

View File

@ -600,7 +600,7 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
{
zval **data;
zval *subitem, *subentries;
int i, j = -1, last = -1, obj_cnt = 0;
int i;
char *sname;
int nid;
X509_NAME_ENTRY * ne;
@ -622,7 +622,6 @@ static void add_assoc_name_entry(zval * val, char * key, X509_NAME * name, int s
ne = X509_NAME_get_entry(name, i);
obj = X509_NAME_ENTRY_get_object(ne);
nid = OBJ_obj2nid(obj);
obj_cnt = 0;
if (shortname) {
sname = (char *) OBJ_nid2sn(nid);