Skip to content

Commit

Permalink
Fix compiler warnnings
Browse files Browse the repository at this point in the history
  • Loading branch information
laruence committed Jan 18, 2013
1 parent e1cda59 commit 3d1d34a
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion routes/interface.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extern zend_class_entry *yaf_route_ce;

yaf_route_t * yaf_route_instance(yaf_route_t *this_ptr, zval *config TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_interface);
YAF_STARTUP_FUNCTION(route);

#endif
/*
Expand Down
2 changes: 1 addition & 1 deletion routes/map.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extern zend_class_entry *yaf_route_map_ce;

yaf_route_t * yaf_route_map_instance(yaf_route_t *this_ptr, zend_bool controller_prefer, char *delim, uint len TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_map);
YAF_STARTUP_FUNCTION(route_map);

#endif
/*
Expand Down
2 changes: 1 addition & 1 deletion routes/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern zend_class_entry *yaf_route_regex_ce;

yaf_route_t * yaf_route_regex_instance(yaf_route_t *this_ptr, zval *route, zval *def, zval *map, zval *verify TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_regex);
YAF_STARTUP_FUNCTION(route_regex);

#endif
/*
Expand Down
2 changes: 1 addition & 1 deletion routes/rewrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern zend_class_entry *yaf_route_rewrite_ce;

yaf_route_t * yaf_route_rewrite_instance(yaf_route_t *this_ptr, zval *match, zval *router, zval *verify TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_rewrite);
YAF_STARTUP_FUNCTION(route_rewrite);

#endif
/*
Expand Down
1 change: 1 addition & 0 deletions routes/simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "php_yaf.h"
#include "yaf_namespace.h"
#include "yaf_exception.h"
#include "yaf_application.h" /* for yaf_application_is_module_name */
#include "yaf_request.h"

#include "yaf_router.h"
Expand Down
2 changes: 1 addition & 1 deletion routes/simple.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extern zend_class_entry *yaf_route_simple_ce;

yaf_route_t * yaf_route_simple_instance(yaf_route_t *this_ptr, zval *module, zval *controller, zval *action TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_simple);
YAF_STARTUP_FUNCTION(route_simple);

#endif
/*
Expand Down
1 change: 1 addition & 0 deletions routes/static.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "php_yaf.h"
#include "yaf_namespace.h"
#include "yaf_exception.h"
#include "yaf_application.h" /* for yaf_application_is_module_name */
#include "yaf_request.h"

#include "yaf_router.h"
Expand Down
2 changes: 1 addition & 1 deletion routes/static.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ extern zend_class_entry *yaf_route_static_ce;

int yaf_route_pathinfo_route(yaf_request_t *request, char *req_uri, int req_uri_len TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_static);
YAF_STARTUP_FUNCTION(route_static);

#endif
/*
Expand Down
2 changes: 1 addition & 1 deletion routes/supervar.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern zend_class_entry *yaf_route_supervar_ce;

yaf_route_t * yaf_route_supervar_instance(yaf_route_t *this_ptr, zval *name TSRMLS_DC);

YAF_STARTUP_FUNCTION(router_supervar);
YAF_STARTUP_FUNCTION(route_supervar);

#endif
/*
Expand Down
1 change: 1 addition & 0 deletions yaf_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

#include "php.h"
#include "php_ini.h"
#include "standard/php_filestat.h" /* for php_stat */

#include "php_yaf.h"
#include "yaf_namespace.h"
Expand Down
1 change: 1 addition & 0 deletions yaf_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif

#include "php.h"
#include "standard/php_string.h" /* for php_basename */
#include "Zend/zend_exceptions.h" /* for zend_exception_get_default */

#include "php_yaf.h"
Expand Down
3 changes: 3 additions & 0 deletions yaf_router.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
#include "php_yaf.h"
#include "yaf_namespace.h"
#include "yaf_exception.h"
#include "yaf_application.h" /* for yaf_application_is_module_name */
#include "yaf_request.h" /* for yaf_request_set_routed */
#include "yaf_router.h"
#include "yaf_config.h"

Expand All @@ -45,6 +47,7 @@ yaf_router_t * yaf_router_instance(yaf_router_t *this_ptr TSRMLS_DC) {
zval *routes;
yaf_router_t *instance;
yaf_route_t *route;
(void)yaf_route_route_arginfo; /* tricky, supress warning "defined but not used" */

if (this_ptr) {
instance = this_ptr;
Expand Down
18 changes: 9 additions & 9 deletions yaf_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,9 @@
#include "views/interface.h"
#include "views/simple.h"

#if 0
static yaf_view_struct yaf_buildin_views[] = {
{"classical", &yaf_view_simple_ce, yaf_view_simple_init},
{NULL, NULL, NULL}
};
#endif

#if 0
/** {{{ yaf_view_t * yaf_view_instance(yaf_view_t *this_ptr TSRMLS_DC)
*/
#if 0
yaf_view_t * yaf_view_instance(yaf_view_t *this_ptr TSRMLS_DC) {
yaf_view_t *view = NULL;
yaf_view_struct *p = yaf_buildin_views;
Expand All @@ -65,12 +58,19 @@ yaf_view_t * yaf_view_instance(yaf_view_t *this_ptr TSRMLS_DC) {

return view;
}
/* }}} */
#endif
/* }}} */

/** {{{ YAF_STARTUP_FUNCTION
*/
YAF_STARTUP_FUNCTION(view) {
/* tricky way to supress warning "defined but not used" */
(void)yaf_view_assign_arginfo;
(void)yaf_view_display_arginfo;
(void)yaf_view_render_arginfo;
(void)yaf_view_getpath_arginfo;
(void)yaf_view_setpath_arginfo;

YAF_STARTUP(view_interface);
YAF_STARTUP(view_simple);

Expand Down

0 comments on commit 3d1d34a

Please sign in to comment.