> I have not checked the coding rules defined for OpenCV but in most projects I have been involved in using "goto" is forbidden. I think the compiler option "-fpermissive" has been added to avoid such some writtings.

But we don't use -fpermissive.

> Using "goto" has many drawbacks: [...snipped...]

One size does not fit all. Yes, in many cases there are better alternatives to `goto`, but that doesn't mean a blanket ban is in order. In this case, I find the original to be more readable than your version. And besides...

> Please find hereafter the errors I got: [...snipped...]

Looks like in this case all you need to do is remove the initializations on `width` and `height`. They get overwritten on the following lines, so the initializations are useless anyway.

> By the way, I am also using other GCC options to help us writting better code which could be usefull.
> In particular: -Wcast-qual, -Wconversion and -Wfloat-equal.
> With the options, we can detect some possible improvement in the code.

Perhaps. If you submit these improvements as a pull request, we'll surely consider them.