all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* problem report #102
@ 2008-12-01 17:01 Dan Nicolaescu
  2008-12-01 18:15 ` Andreas Schwab
  0 siblings, 1 reply; 5+ messages in thread
From: Dan Nicolaescu @ 2008-12-01 17:01 UTC (permalink / raw)
  To: emacs-devel

CID: 102
Checker: NEGATIVE_RETURNS (help)
File: base/src/emacs/src/editfns.c
Function: Fformat_time_string
Description: Negative constant "-1" was passed to a negative sink.


1678 	For example, to produce full ISO 8601 format, use "%Y-%m-%dT%T%z".  */)
1679 	     (format_string, time, universal)
1680 	     Lisp_Object format_string, time, universal;
1681 	{
1682 	  time_t value;
1683 	  int size;
1684 	  struct tm *tm;

At conditional (1): "universal != Qnil" taking true path

1685 	  int ut = ! NILP (universal);
1686 	

At conditional (2): "format_string & 7 != 3" taking false path
At conditional (3): "0" taking false path

1687 	  CHECK_STRING (format_string);
1688 	

At conditional (4): "lisp_time_argument == 0" taking false path

1689 	  if (! lisp_time_argument (time, &value, NULL))
1690 	    error ("Invalid time specification");
1691 	
1692 	  format_string = code_convert_string_norecord (format_string,
1693 							Vlocale_coding_system, 1);
1694 	
1695 	  /* This is probably enough.  */

At conditional (5): "((0), (format_string & -8))->size_byte < 0" taking true path

1696 	  size = SBYTES (format_string) * 6 + 50;
1697 	
1698 	  BLOCK_INPUT;

At conditional (6): "ut != 0" taking true path

1699 	  tm = ut ? gmtime (&value) : localtime (&value);

At conditional (7): "interrupt_input_blocked == 0" taking true path
At conditional (8): "interrupt_input_pending != 0" taking true path
At conditional (9): "pending_atimers != 0" taking true path
At conditional (10): "0" taking false path

1700 	  UNBLOCK_INPUT;

At conditional (11): "tm == 0" taking false path

1701 	  if (! tm)
1702 	    error ("Specified time is not representable");
1703 	
1704 	  synchronize_system_time_locale ();
1705 	

At conditional (12): "1" taking true path

1706 	  while (1)
1707 	    {
1708 	      char *buf = (char *) alloca (size + 1);
1709 	      int result;
1710 	
1711 	      buf[0] = '\1';
1712 	      BLOCK_INPUT;

At conditional (13): "((0), (format_string & -8))->size_byte < 0" taking true path

1713 	      result = emacs_memftimeu (buf, size, SDATA (format_string),
1714 					SBYTES (format_string),
1715 					tm, ut);

At conditional (14): "interrupt_input_blocked == 0" taking true path
At conditional (15): "interrupt_input_pending != 0" taking true path
At conditional (16): "pending_atimers != 0" taking true path
At conditional (17): "0" taking false path

1716 	      UNBLOCK_INPUT;

At conditional (18): "result > 0" taking false path
At conditional (19): "result == 0" taking true path
At conditional (20): "*(buf + 0) == 0" taking false path

1717 	      if ((result > 0 && result < size) || (result == 0 && buf[0] == '\0'))
1718 		return code_convert_string_norecord (make_unibyte_string (buf, result),
1719 						     Vlocale_coding_system, 0);
1720 	
1721 	      /* If buffer was too small, make it bigger and try again.  */
1722 	      BLOCK_INPUT;

Event negative_returns: Negative constant "-1" was passed to a negative sink. [model]
At conditional (21): "((0), (format_string & -8))->size_byte < 0" taking true path

1723 	      result = emacs_memftimeu (NULL, (size_t) -1,
1724 					SDATA (format_string),
1725 					SBYTES (format_string),
1726 					tm, ut);
1727 	      UNBLOCK_INPUT;
1728 	      size = result + 1;
1729 	    }
17




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-01 19:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-01 17:01 problem report #102 Dan Nicolaescu
2008-12-01 18:15 ` Andreas Schwab
2008-12-01 18:34   ` Dan Nicolaescu
2008-12-01 18:51     ` Andreas Schwab
2008-12-01 19:00       ` Dan Nicolaescu

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.