Thanks to visit codestin.com
Credit goes to github.com

Skip to content

trying to fix compiler warnings #238

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

Merged
merged 3 commits into from
Aug 29, 2012
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions library.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ PHPAPI int redis_check_eof(RedisSock *redis_sock TSRMLS_DC)
for (; eof; count++) {
if((MULTI == redis_sock->mode) || redis_sock->watching || count == 10) { /* too many failures */
if(redis_sock->stream) { /* close stream if still here */
redis_stream_close(redis_sock);
redis_stream_close(redis_sock TSRMLS_CC);
redis_sock->stream = NULL;
redis_sock->mode = ATOMIC;
redis_sock->status = REDIS_SOCK_STATUS_FAILED;
Expand All @@ -51,7 +51,7 @@ PHPAPI int redis_check_eof(RedisSock *redis_sock TSRMLS_DC)
return -1;
}
if(redis_sock->stream) { /* close existing stream before reconnecting */
redis_stream_close(redis_sock);
redis_stream_close(redis_sock TSRMLS_CC);
redis_sock->stream = NULL;
redis_sock->mode = ATOMIC;
redis_sock->watching = 0;
Expand Down
2 changes: 0 additions & 2 deletions redis.c
Original file line number Diff line number Diff line change
Expand Up @@ -3625,15 +3625,13 @@ PHP_METHOD(Redis, brpoplpush)
*/
PHP_METHOD(Redis, zAdd) {

zval *object;
RedisSock *redis_sock;

char *cmd;
int cmd_len, key_len, val_len;
double score;
char *key, *val;
int val_free, key_free = 0;
zval *z_value;
char *dbl_str;
int dbl_len;

Expand Down
12 changes: 4 additions & 8 deletions redis_array.c
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ uint32_t rcrc32(const char *s, size_t sz) {
PHP_METHOD(RedisArray, __construct)
{
zval *z0, *z_fun = NULL, *z_dist = NULL, **zpData, *z_opts = NULL;
char *name = NULL;
int id;
RedisArray *ra = NULL;
zend_bool b_index = 0, b_autorehash = 0;
Expand Down Expand Up @@ -457,7 +456,6 @@ PHP_METHOD(RedisArray, _instance)
PHP_METHOD(RedisArray, _function)
{
zval *object;
int i;
RedisArray *ra;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
Expand All @@ -480,7 +478,6 @@ PHP_METHOD(RedisArray, _function)
PHP_METHOD(RedisArray, _distributor)
{
zval *object;
int i;
RedisArray *ra;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
Expand Down Expand Up @@ -838,12 +835,11 @@ PHP_METHOD(RedisArray, mget)
/* MSET will distribute the call to several nodes and regroup the values. */
PHP_METHOD(RedisArray, mset)
{
zval *object, *z_keys, z_fun, *z_argarray, **data, z_ret, **z_cur, *z_tmp;
int i, j, n;
zval *object, *z_keys, z_fun, *z_argarray, **data, z_ret;
int i, n;
RedisArray *ra;
int *pos, argc, *argc_each;
HashTable *h_keys;
HashPosition pointer;
zval **redis_instances, *redis_inst, **argv;
char *key, **keys;
unsigned int key_len;
Expand Down Expand Up @@ -959,8 +955,8 @@ PHP_METHOD(RedisArray, mset)
/* DEL will distribute the call to several nodes and regroup the values. */
PHP_METHOD(RedisArray, del)
{
zval *object, *z_keys, z_fun, *z_argarray, **data, *z_ret, **z_cur, *z_tmp_array, *z_tmp, **z_args;
int i, j, n;
zval *object, *z_keys, z_fun, *z_argarray, **data, *z_ret, *z_tmp, **z_args;
int i, n;
RedisArray *ra;
int *pos, argc, *argc_each;
HashTable *h_keys;
Expand Down
7 changes: 2 additions & 5 deletions redis_array_impl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ ra_load_hosts(RedisArray *ra, HashTable *hosts TSRMLS_DC)
int count = zend_hash_num_elements(hosts);
char *host, *p;
short port;
zval **zpData, z_cons, *z_args, z_ret;
zval **zpData, z_cons, z_ret;
RedisSock *redis_sock = NULL;

/* function calls on the Redis object */
Expand Down Expand Up @@ -537,7 +537,6 @@ ra_index_keys(zval *z_pairs, zval *z_redis TSRMLS_DC) {
void
ra_index_key(const char *key, int key_len, zval *z_redis TSRMLS_DC) {

int i;
zval z_fun_sadd, z_ret, *z_args[2];
MAKE_STD_ZVAL(z_args[0]);
MAKE_STD_ZVAL(z_args[1]);
Expand Down Expand Up @@ -741,8 +740,7 @@ ra_get_key_type(zval *z_redis, const char *key, int key_len, zval *z_from, long
static void
ra_remove_from_index(zval *z_redis, const char *key, int key_len TSRMLS_DC) {

int i;
zval z_fun_get, z_fun_srem, z_ret, *z_args[2];
zval z_fun_srem, z_ret, *z_args[2];

/* run SREM on source index */
ZVAL_STRINGL(&z_fun_srem, "SREM", 4, 0);
Expand Down Expand Up @@ -816,7 +814,6 @@ ra_move_zset(const char *key, int key_len, zval *z_from, zval *z_to, long ttl TS
unsigned int val_len;
int i;
unsigned long idx;
int type;

/* run ZRANGE key 0 -1 WITHSCORES on source */
ZVAL_STRINGL(&z_fun_zrange, "ZRANGE", 6, 0);
Expand Down