made port->type default stuff compile with gcc 2.95.3
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@3682 67ed7778-7388-44ab-90cf-0a291f65f57c
This commit is contained in:
@@ -137,16 +137,18 @@ struct _CameraPrivateLibrary
|
||||
/* These contain the default label for all the
|
||||
* switch (camera->port->type) statements
|
||||
*/
|
||||
#define GP_PORT_DEFAULT_RETURN(RETVAL) \
|
||||
#define GP_PORT_DEFAULT_RETURN_INTERNAL(return_statement) \
|
||||
default: \
|
||||
gp_camera_set_error (camera, "Don't know how to handle " \
|
||||
"camera->port->type value %i aka 0x%x" \
|
||||
"in %s line %i.", camera->port->type, \
|
||||
camera->port->type, __FILE__, __LINE__); \
|
||||
return RETVAL; \
|
||||
return_statement; \
|
||||
break;
|
||||
|
||||
#define GP_PORT_DEFAULT GP_PORT_DEFAULT_RETURN(GP_ERROR_BAD_PARAMETERS)
|
||||
#define GP_PORT_DEFAULT_RETURN_EMPTY GP_PORT_DEFAULT_RETURN_INTERNAL(return)
|
||||
#define GP_PORT_DEFAULT_RETURN(RETVAL) GP_PORT_DEFAULT_RETURN_INTERNAL(return RETVAL)
|
||||
#define GP_PORT_DEFAULT GP_PORT_DEFAULT_RETURN(GP_ERROR_BAD_PARAMETERS)
|
||||
|
||||
/*
|
||||
* All functions returning a pointer have malloc'ed the data. The caller must
|
||||
|
||||
@@ -166,7 +166,7 @@ canon_int_switch_camera_off (Camera *camera)
|
||||
case GP_PORT_USB:
|
||||
GP_DEBUG ("Not trying to shut down USB camera...");
|
||||
break;
|
||||
GP_PORT_DEFAULT_RETURN()
|
||||
GP_PORT_DEFAULT_RETURN_EMPTY
|
||||
}
|
||||
clear_readiness (camera);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user