Bug 133866 - Bogus THROW spec in /usr/include/utime.h
Summary: Bogus THROW spec in /usr/include/utime.h
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc   
(Show other bugs)
Version: 3
Hardware: All Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-09-28 00:29 UTC by Tom Lane
Modified: 2016-11-24 16:15 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-28 07:55:41 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Tom Lane 2004-09-28 00:29:55 UTC
Description of problem: gcc -Wall generates a warning "null argument
where non-null required" when the second argument of utime() is NULL.
A null second argument is legal per the man page, per the Single Unix
Spec, and per experiment, so the warning is bogus.  Accordingly, the
THROW spec in /usr/include/utime.h is wrong.

Version-Release number of selected component (if applicable):

How reproducible: Always.

Steps to Reproduce:
[tgl@rh1 ~]$ cat utimetest.c
#include <stdlib.h>
#include <sys/types.h>
#include <utime.h>

int main(int argc, char** argv)
  char * path = argv[1];

  utime(path, NULL);

  return 0;
[tgl@rh1 ~]$ gcc -Wall utimetest.c
utimetest.c: In function `main':
utimetest.c:9: warning: null argument where non-null required (arg 2)
[tgl@rh1 ~]$ ./a.out a.out
[tgl@rh1 ~]$ -- note lack of crash
Actual results:

Expected results: No warning.

Additional info:

Comment 1 Jakub Jelinek 2004-09-28 07:55:41 UTC
The problem was not in __THROW (which is something completely else),
but with __nonnull ((1, 2)) attribute on utime which ought to be
__nonnull ((1)).
Fixed in CVS, will make it into next rawhide rpms.

Note You need to log in before you can comment on or make changes to this bug.