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

Removed unused size variable. #126

Closed
wants to merge 1 commit into from
Closed

Conversation

fingon
Copy link
Contributor

@fingon fingon commented Mar 26, 2014

The 'size' was set but not used -> gcc compilation failed. I don't see use for it so removing it.

@quoidautre
Copy link

Hi,
I have the same error :

$ sudo make 
make  all-recursive
make[1]: entrant dans le répertoire « /opt/zephir/json-c »
Making all in .
make[2]: entrant dans le répertoire « /opt/zephir/json-c »
/bin/bash ./libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.    -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -g -O2 -MT json_tokener.lo -MD -MP -MF .deps/json_tokener.Tpo -c -o json_tokener.lo json_tokener.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -Wall -Werror -Wextra -Wwrite-strings -Wno-unused-parameter -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -g -O2 -MT json_tokener.lo -MD -MP -MF .deps/json_tokener.Tpo -c json_tokener.c  -fPIC -DPIC -o .libs/json_tokener.o
json_tokener.c: In function 'json_tokener_parse_ex':
json_tokener.c:344:6: error: variable 'size' set but not used [-Werror=unused-but-set-variable]
  int size;
      ^
cc1: all warnings being treated as errors
make[2]: *** [json_tokener.lo] Erreur 1
make[2]: quittant le répertoire « /opt/zephir/json-c »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /opt/zephir/json-c »
make: *** [all] Erreur 2
$ php -v
PHP 5.5.3-1ubuntu2.2 (cli) (built: Feb 28 2014 20:03:35) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2013 Zend Technologies
    with Zend OPcache v7.0.3-dev, Copyright (c) 1999-2013, by Zend Technologies
    with Xdebug v2.2.3, Copyright (c) 2002-2013, by Derick Rethans
$ phpize -v
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212

Any idea ?
Can anybony helps me ?

Thanks
Fabrice

@fingon
Copy link
Contributor Author

fingon commented Mar 27, 2014

Compile from my git branch or wait for maintainer to merge the fix.

@quoidautre
Copy link

Hi,
Thanks, but I just comment the lines in json_tokener.c (#124) and it's all right.

I have an another error when I launch my code, but I think it's not the same issue.

Regards.
Fabrice

@hawicz
Copy link
Member

hawicz commented Apr 20, 2014

merged from a different pull request

@hawicz hawicz closed this Apr 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants