Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile errors #18

Merged
merged 5 commits into from
Mar 28, 2024
Merged

Fix compile errors #18

merged 5 commits into from
Mar 28, 2024

Conversation

umireon
Copy link
Member

@umireon umireon commented Mar 27, 2024

I got following errors on Flatpak. This PR fixes these errors.

/run/build/obs-ocr/src/tesseract-ocr-utils.cpp: In function ‘void tesseract_thread(void*)’:
/run/build/obs-ocr/src/tesseract-ocr-utils.cpp:363:75: error: conversion from ‘int’ to ‘uint16_t’ {aka ‘short unsigned int’} may change value [-Werror=conversion]
  363 |                                                 uint16_t block_size = tf->binarizationBlockSize;
      |                                                                       ~~~~^~~~~~~~~~~~~~~~~~~~~
/run/build/obs-ocr/src/tesseract-ocr-utils.cpp:409:92: error: conversion from ‘int’ to ‘float’ may change value [-Werror=conversion]
  409 |                                                 (float)tf->rescaleTargetSize / imageForOCR.rows;
      |                                                                                ~~~~~~~~~~~~^~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
Error: module obs-ocr: Child process exited with code 1

@umireon umireon requested a review from royshil March 27, 2024 19:42
Copy link
Contributor

@royshil royshil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

go!

@umireon umireon merged commit b772225 into main Mar 28, 2024
6 checks passed
@umireon umireon deleted the umireon/fix-warnings branch March 28, 2024 10:01
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.

None yet

2 participants