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

problem warning compile ZSTD 1.5.0 with Visual Studio 2019 #2661

Closed
gvollant opened this issue May 16, 2021 · 1 comment
Closed

problem warning compile ZSTD 1.5.0 with Visual Studio 2019 #2661

gvollant opened this issue May 16, 2021 · 1 comment

Comments

@gvollant
Copy link

         C:\cygwin64\home\exploit\develop_20210516_124802_cible\exterieur\zstd\lib\compress\zstd_lazy.c(1399): error C4703: variable de pointeur locale potentiellement non initialis‚e 'dmsTagRow' utilis‚e [C:\cygwin64\home\exploit\develop_20210516_124802_cible\amaLibPhone.vcxproj]
         C:\cygwin64\home\exploit\develop_20210516_124802_cible\exterieur\zstd\lib\compress\zstd_lazy.c(1407): error C4703: variable de pointeur locale potentiellement non initialis‚e 'dmsRow' utilis‚e [C:\cygwin64\home\exploit\develop_20210516_124802_cible\amaLibPhone.vcxproj]

the error is described at https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4703?view=msvc-160

I suppres the warning with this simple fix:
*** /mnt/n/devn/exterieur/zstd/lib/compress/zstd_lazy.c 2021-05-16 13:21:45.021859200 +0200
--- /mnt/w/softw/exterieur/zstd/lib/compress/zstd_lazy.c        2021-05-16 14:34:23.300517900 +0200
***************
*** 1296,1303 ****
      size_t ddsIdx;
      U32 ddsExtraAttempts; /* cctx hash tables are limited in searches, but allow extra searches into DDS */
      U32 dmsTag;
!     U32* dmsRow;
!     BYTE* dmsTagRow;

      if (dictMode == ZSTD_dedicatedDictSearch) {
          const U32 ddsHashLog = dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG;
--- 1296,1303 ----
      size_t ddsIdx;
      U32 ddsExtraAttempts; /* cctx hash tables are limited in searches, but allow extra searches into DDS */
      U32 dmsTag;
!     U32* dmsRow = NULL;
!     BYTE* dmsTagRow = NULL;

      if (dictMode == ZSTD_dedicatedDictSearch) {
          const U32 ddsHashLog = dms->cParams.hashLog - ZSTD_LAZY_DDSS_BUCKET_LOG;
@gvollant
Copy link
Author

the fix is at #2654

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

No branches or pull requests

1 participant