Skip to content

mingw - bug correction - C99 compliance#1037

Closed
philippefoubert wants to merge 10 commits intoopencv:masterfrom
philippefoubert:master
Closed

mingw - bug correction - C99 compliance#1037
philippefoubert wants to merge 10 commits intoopencv:masterfrom
philippefoubert:master

Conversation

@philippefoubert
Copy link
Copy Markdown
Contributor

See the bugfix #2743 i have posted 5 months ago:

Some functions provided by Microsoft does not work as described in C99 specifications. For example function 'vsnprintf' does not return number of characters that would have been printed but only '-1' if the format does not fit in the given field.

Mingw provides possibility to assume ANSI I/O standards are preferred over Microsoft's. This is enabled by
#define __USE_MINGW_ANSI_STDIO 1
before including any system libraries. This way, without modifying the code, the call to "sprintf" (Microsoft's implementation) is replaced by a call to "__mingw_sprintf" which is C99 compliant.

@ghost ghost assigned vpisarev Jun 23, 2013
@vpisarev
Copy link
Copy Markdown
Contributor

👍

@philippefoubert
Copy link
Copy Markdown
Contributor Author

Hi Vadim,

A simple question (i am a newbie on GitHub....): could you tell me if it is possible to post several pull requests (or tell me how to proceed) ? (to avoid the "Oops! There's already a pull request for philippefoubert:master Try a different branch or view the pull request?" message)

I have made some other commits which shall also be interesting and while i have a pull request in progresss it seems not possible to submit another one...

I made my current pull request on the master branch: is it the expected way or shall it be preferable to do it on the 2.4 branch?

I have several other evolutions which could be interesting so if i could do it the right way...

Regards,
Philippe.

@vpisarev
Copy link
Copy Markdown
Contributor

Hi Philippe,

The recommended practice is to create a separate branch (based on master) for each pull request. Then you can prepare and submit simultaneously as many pull requests as you want.

Regards,
Vadim

23.06.2013, в 12:53, Philippe FOUBERT notifications@github.com написал(а):

Hi Vadim,

A simple question (i am a newbie on GitHub....): could you tell me if it is possible to post several pull requests (or tell me how to proceed) ?
(to avoid the "Oops! There's already a pull request for philippefoubert:master Try a different branch or view the pull request?" message)

I have made some other commits which shall also be interesting and while i have a pull request in progresss it seems not possible de submit another one...

I made my current pull request on the master branch: is it the expected way or shall it be preferable to do it on the 2.4 branch?

I have several other evolutions which could be interesting so if i could do it the right way...

Regards,

Philippe.

----- Mail original -----
De: "Vadim Pisarevsky" notifications@github.com
À: "Itseez/opencv" opencv@noreply.github.com
Cc: "Philippe FOUBERT" philippe.foubert@free.fr
Envoyé: Dimanche 23 Juin 2013 10:09:50
Objet: Re: [opencv] mingw - bug correction - C99 compliance (#1037)

👍


Reply to this email directly or view it on GitHub .

Reply to this email directly or view it on GitHub.

@philippefoubert
Copy link
Copy Markdown
Contributor Author

Thanks Vadim.

The next pull requests will be better. For the current one, the only commit to take into account is on "cmake/OpenCVCompilerOptions.cmake".

@philippefoubert
Copy link
Copy Markdown
Contributor Author

Sorry... I only wanted to update the comment.

@SpecLad
Copy link
Copy Markdown

SpecLad commented Jun 24, 2013

For the current one, the only commit to take into account is on "cmake/OpenCVCompilerOptions.cmake".

That is not quite possible. I mean it is, but I would rather not bypass GitHub's pull request mechanism by manually merging just one commit out of a pull request. Plus, that commit doesn't have your name on it - you don't want to remain uncredited, do you? 😉

I would suggest you either close this PR and make a new one per each independent issue that you have, or rewrite this one to only contain the commit you wanted to submit. It seems like this issue affects the 2.4 branch as well as master; if that is the case, you should prefer the former option, and submit your new PR against 2.4.

@philippefoubert
Copy link
Copy Markdown
Contributor Author

You are right. It was my first pull request on GitHub...
I replaced it by the pull request #1043 done in a cleaner way.

asmorkalov pushed a commit that referenced this pull request Nov 9, 2023
finiteMask() and doubles for patchNaNs() #23098

Related to #22826
Connected PR in extra: [#1037@extra](opencv/opencv_extra#1037)

### TODOs:
- [ ] Vectorize `finiteMask()` for 64FC3 and 64FC4

### Changes

This PR:
* adds a new function `finiteMask()`
* extends `patchNaNs()` by CV_64F support
* moves `patchNaNs()` and `finiteMask()` to a separate file

**NOTE:** now the function is called `finiteMask()` as discussed with the OpenCV core team

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
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.

3 participants