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(pfile): Fix warnings in ununpack and wget #1376

Merged
merged 1 commit into from Jun 21, 2019

Conversation

GMishx
Copy link
Member

@GMishx GMishx commented Jun 19, 2019

Description

  • Due to recent changes, ununpack agent and wget agent were generating following warnings:
utils.c: In functionDisplayContainerInfo’:
utils.c:1580:7: warning: ignoring return value offscanf’, declared with attribute warn_unused_result [-Wunused-result]
       fscanf(file, "%64s", SHA256);
       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
wget_agent.c: In functionDBLoadGold’:
wget_agent.c:117:5: warning: ignoring return value offscanf’, declared with attribute warn_unused_result [-Wunused-result]
     fscanf(file, "%64s", SHA256);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • Also, if the file path contains any special characters, the call to sha256sum fails.

Changes

  1. Fix the warnings in ununpack agent and wget agent due to ignored return value of fscanf.
  2. Remove unnecessary includes in utils.c
  3. Enclose the file path in ' ' quotes to accommodate special characters in file path.

1. Fix the warnings in ununpack agent and wget agent due to
ignored return value of fscanf.
2. Remove unnecessary includes in utils.c
3. Enclose path for sha256sum in quotes to accomodate special
characters.

Signed-off-by: Gaurav Mishra <mishra.gaurav@siemens.com>
@GMishx GMishx removed their assignment Jun 20, 2019
@GMishx GMishx removed the WIP label Jun 20, 2019
Copy link
Contributor

@shaheemazmalmmd shaheemazmalmmd left a comment

Choose a reason for hiding this comment

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

Code looks good.

@shaheemazmalmmd shaheemazmalmmd merged commit 02af914 into fossology:master Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants