mirror of
https://github.com/Motion-Project/motion.git
synced 2026-05-19 03:55:43 -04:00
Compiler Warnings
This commit is contained in:
@@ -766,13 +766,14 @@ static int alg_diff_standard(struct ctx_cam *cam, unsigned char *new_var) {
|
||||
unsigned char *mask = imgs->mask;
|
||||
unsigned char *smartmask_final = imgs->smartmask_final;
|
||||
int *smartmask_buffer = imgs->smartmask_buffer;
|
||||
unsigned char curdiff;
|
||||
|
||||
i = imgs->motionsize;
|
||||
memset(out + i, 128, i / 2); /* Motion pictures are now b/w i.o. green */
|
||||
memset(out, 0, i);
|
||||
|
||||
for (; i > 0; i--) {
|
||||
register unsigned char curdiff = (int)(abs(*ref - *new_var)); /* Using a temp variable is 12% faster. */
|
||||
curdiff = (int)(abs(*ref - *new_var)); /* Using a temp variable is 12% faster. */
|
||||
/* Apply fixed mask */
|
||||
if (mask)
|
||||
curdiff = ((int)(curdiff * *mask++) / 255);
|
||||
@@ -812,6 +813,7 @@ static char alg_diff_fast(struct ctx_cam *cam, int max_n_changes, unsigned char
|
||||
int i, diffs = 0, step = imgs->motionsize/10000;
|
||||
int noise = cam->noise;
|
||||
unsigned char *ref = imgs->ref;
|
||||
unsigned char curdiff;
|
||||
|
||||
if (!step % 2)
|
||||
step++;
|
||||
@@ -821,7 +823,7 @@ static char alg_diff_fast(struct ctx_cam *cam, int max_n_changes, unsigned char
|
||||
i = imgs->motionsize;
|
||||
|
||||
for (; i > 0; i -= step) {
|
||||
register unsigned char curdiff = (int)(abs((char)(*ref - *new_var))); /* Using a temp variable is 12% faster. */
|
||||
curdiff = (int)(abs((char)(*ref - *new_var))); /* Using a temp variable is 12% faster. */
|
||||
if (curdiff > noise) {
|
||||
diffs++;
|
||||
if (diffs > max_n_changes)
|
||||
|
||||
@@ -69,7 +69,7 @@ static void reverse_inplace_quad(unsigned char *src, int size)
|
||||
{
|
||||
uint32_t *nsrc = (uint32_t *)src; /* first quad */
|
||||
uint32_t *ndst = (uint32_t *)(src + size - 4); /* last quad */
|
||||
register uint32_t tmp;
|
||||
uint32_t tmp;
|
||||
|
||||
while (nsrc < ndst) {
|
||||
tmp = bswap_32(*ndst);
|
||||
@@ -80,7 +80,7 @@ static void reverse_inplace_quad(unsigned char *src, int size)
|
||||
|
||||
static void flip_inplace_horizontal(unsigned char *src, int width, int height) {
|
||||
uint8_t *nsrc, *ndst;
|
||||
register uint8_t tmp;
|
||||
uint8_t tmp;
|
||||
int l,w;
|
||||
|
||||
for(l=0; l < height/2; l++) {
|
||||
@@ -98,7 +98,7 @@ static void flip_inplace_horizontal(unsigned char *src, int width, int height) {
|
||||
static void flip_inplace_vertical(unsigned char *src, int width, int height)
|
||||
{
|
||||
uint8_t *nsrc, *ndst;
|
||||
register uint8_t tmp;
|
||||
uint8_t tmp;
|
||||
int l;
|
||||
|
||||
for(l=0; l < height; l++) {
|
||||
@@ -129,11 +129,11 @@ static void flip_inplace_vertical(unsigned char *src, int width, int height)
|
||||
*
|
||||
* Returns: nothing
|
||||
*/
|
||||
static void rot90cw(unsigned char *src, register unsigned char *dst, int size,
|
||||
static void rot90cw(unsigned char *src, unsigned char *dst, int size,
|
||||
int width, int height)
|
||||
{
|
||||
unsigned char *endp;
|
||||
register unsigned char *base;
|
||||
unsigned char *base;
|
||||
int j;
|
||||
|
||||
endp = src + size;
|
||||
@@ -162,11 +162,11 @@ static void rot90cw(unsigned char *src, register unsigned char *dst, int size,
|
||||
*
|
||||
* Returns: nothing
|
||||
*/
|
||||
static inline void rot90ccw(unsigned char *src, register unsigned char *dst,
|
||||
static inline void rot90ccw(unsigned char *src, unsigned char *dst,
|
||||
int size, int width, int height)
|
||||
{
|
||||
unsigned char *endp;
|
||||
register unsigned char *base;
|
||||
unsigned char *base;
|
||||
int j;
|
||||
|
||||
endp = src + size;
|
||||
|
||||
@@ -915,7 +915,7 @@ void webu_text_get_query(struct webui_ctx *webui) {
|
||||
if (mystrne(webui->uri_value1, config_parms[indx_parm].parm_name.c_str())){
|
||||
MOTION_LOG(NTC, TYPE_STREAM, NO_ERRNO
|
||||
, _("'%s' option is depreciated. New option name is `%s'")
|
||||
,webui->uri_value1, config_parms[indx_parm].parm_name);
|
||||
,webui->uri_value1, config_parms[indx_parm].parm_name.c_str());
|
||||
}
|
||||
|
||||
webu_text_header(webui);
|
||||
|
||||
Reference in New Issue
Block a user